SyntaxFix
Write A Post
Hire A Developer
Questions
No magic involved, just subtract from the offset top of the element
$('html, body').animate({scrollTop: $('#contact').offset().top -100 }, 'slow');