$("nav#navigation li a[href^='#']
").click(function(e) {
e.preventDefault();
var headerheihgt = $('#header').css('height');
$('html, body').stop().animate({
'scrollTop': $(this.hash).offset().top - parseInt(headerheihgt)
}, 500);
});
Tuesday, 31 January 2017
How to add offset to jquery scrolltop ?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment