diff options
| author | Bulletin <bulletin@bulletinalpha.tk> | 2016-12-29 16:42:32 -0500 |
|---|---|---|
| committer | Bulletin <bulletin@bulletinalpha.tk> | 2016-12-29 16:42:32 -0500 |
| commit | 1a7fa60f6cb2ee26843ca19e37bb4ff44104ad55 (patch) | |
| tree | 2fa1fbdea9992ab63ba2a7abbac8bbcd633d13f7 /js/frontpage.js | |
| download | bulletin-1a7fa60f6cb2ee26843ca19e37bb4ff44104ad55.tar.gz | |
Added existing progress
Diffstat (limited to 'js/frontpage.js')
| -rw-r--r-- | js/frontpage.js | 11 |
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); + } + }); +}); |
