I have a page that scrolls to a particular element. Problem is, the page scrolls all the way to the top of the element… I would like to have a bit of a “buffer” between the top of the page and the element. I am currently doing:
$("html,body").animate({scrollTop: $("#elementID").offset().top},"slow");
Jezzes :
$("html,body").animate({scrollTop: $("#elementID").offset().top - 300},"slow");