diff options
author | prashant | 2016-08-18 15:15:17 +0530 |
---|---|---|
committer | prashant | 2016-08-18 15:31:54 +0530 |
commit | 2ba4fe9996eaafd8c98aa93b28062e7b0a861695 (patch) | |
tree | 0d38530c578b76052336ba8b922fc2374f808d93 /js/smooth_scroll.js | |
parent | 7f43918cb4be99642c144f88b0c0e1db92f3bae7 (diff) | |
download | job_portal-2ba4fe9996eaafd8c98aa93b28062e7b0a861695.tar.gz job_portal-2ba4fe9996eaafd8c98aa93b28062e7b0a861695.tar.bz2 job_portal-2ba4fe9996eaafd8c98aa93b28062e7b0a861695.zip |
formated the code
Diffstat (limited to 'js/smooth_scroll.js')
-rwxr-xr-x | js/smooth_scroll.js | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/js/smooth_scroll.js b/js/smooth_scroll.js index d16dc1a..10e9145 100755 --- a/js/smooth_scroll.js +++ b/js/smooth_scroll.js @@ -1,26 +1,25 @@ (function($) { - $(document).ready(function() { - $('a[href*=#]:not([href=#])').click(function() { - if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') - || location.hostname == this.hostname) { - - var target = $(this.hash); - target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); - if (target.length) { - $('html,body').animate({ - scrollTop: target.offset().top - }, 1000); - return false; - } - } - }); - $(".quick").click(function() { - $(".quick").removeClass("badge-success"); - $(this).addClass("badge-success"); - setTimeout(function() { - $(".quick").removeClass("badge-success"); - }, 4000); - }); - $('.quick').tooltip(); - }); + $(document).ready(function() { + $('a[href*=#]:not([href=#])').click(function() { + if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') + || location.hostname == this.hostname) { + var target = $(this.hash); + target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); + if (target.length) { + $('html,body').animate({ + scrollTop: target.offset().top + }, 1000); + return false; + } + } + }); + $(".quick").click(function() { + $(".quick").removeClass("badge-success"); + $(this).addClass("badge-success"); + setTimeout(function() { + $(".quick").removeClass("badge-success"); + }, 4000); + }); + //$('.quick').tooltip(); + }); })(jQuery); |