david-p
10/25/2016 - 4:00 PM

jquery scroll w/ offset control

jquery scroll w/ offset control

$('html, body').animate({scrollTop: $('#contact').offset().top -100 }, 'slow');

or

$('html,body').animate({
    scrollTop: $('#menu').offset().top - 5 // or 10
}, 'slow');