diff options
author | Jayaram R Pai | 2014-07-30 18:12:23 +0530 |
---|---|---|
committer | Jayaram R Pai | 2014-07-30 18:12:23 +0530 |
commit | f83ffd87d4decbbe05a4c8a26c4c9860c223e72e (patch) | |
tree | f4b765d76b5c431b563134f15caa6f0e4ad80179 /js/smooth_scroll.js | |
parent | c446c2b1a27df3e38ad788f2ed5cd4d0415b58d3 (diff) | |
download | job_portal-f83ffd87d4decbbe05a4c8a26c4c9860c223e72e.tar.gz job_portal-f83ffd87d4decbbe05a4c8a26c4c9860c223e72e.tar.bz2 job_portal-f83ffd87d4decbbe05a4c8a26c4c9860c223e72e.zip |
added quick_links for jobs page
Diffstat (limited to 'js/smooth_scroll.js')
-rw-r--r-- | js/smooth_scroll.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/js/smooth_scroll.js b/js/smooth_scroll.js new file mode 100644 index 0000000..d16dc1a --- /dev/null +++ b/js/smooth_scroll.js @@ -0,0 +1,26 @@ +(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(); + }); +})(jQuery); |