summaryrefslogtreecommitdiff
path: root/js/frontpage.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/frontpage.js')
-rw-r--r--js/frontpage.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/frontpage.js b/js/frontpage.js
new file mode 100644
index 0000000..e809225
--- /dev/null
+++ b/js/frontpage.js
@@ -0,0 +1,11 @@
+$(function() {
+ $('a[href^="#"]').on('click', function(e) {
+ var target = $(this.getAttribute('href'));
+ if (target.length) {
+ e.preventDefault();
+ $('html, body').stop().animate({
+ scrollTop: target.offset().top
+ }, 500);
+ }
+ });
+});