From d0deac412721b997c5b85fcabac045afc8b940dc Mon Sep 17 00:00:00 2001 From: Luis Felipe Jimenez Ferreira Date: Wed, 28 Dec 2016 00:25:05 -0500 Subject: [PATCH 1/2] Added smooth scroll to the project --- app/scripts/smoothScroll.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/scripts/smoothScroll.js 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; + } + } + }); +}); From 6057abeaf027521b95a47aa873f463b4c260212e Mon Sep 17 00:00:00 2001 From: Luis Felipe Jimenez Ferreira Date: Wed, 28 Dec 2016 00:26:17 -0500 Subject: [PATCH 2/2] SmoothScroll Added smooth scroll on the main page --- app/index.html | 4 ++++ 1 file changed, 4 insertions(+) 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

+ + + +