Created
March 13, 2018 12:26
-
-
Save Hatteron/ad6b751f2906304cf2e30298069298a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pge scroll | |
$j('.menu-item a[href^="#"]').on('click',function (e) { | |
e.preventDefault(); | |
var target = this.hash, | |
jQuerytarget = $j(target); | |
var scroll_pos = jQuerytarget.offset().top - 80; | |
$j('html, body').stop().animate({ | |
'scrollTop': scroll_pos}, 1000, 'swing'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment