diff --git a/app/index.html b/app/index.html index 0a573adaf..26f2dfc8e 100644 --- a/app/index.html +++ b/app/index.html @@ -284,9 +284,13 @@

FAQ

+ + + + diff --git a/app/scripts/smoothScroll.js b/app/scripts/smoothScroll.js new file mode 100644 index 000000000..81c374d5d --- /dev/null +++ b/app/scripts/smoothScroll.js @@ -0,0 +1,14 @@ +$(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; + } + } + }); +});