This is the code to scroll to top, tied into an html link element (shown below).


// Back To Top
$('a.top').click(function(){
$(document.body).animate({scrollTop : 0},800);
return false;
});
  

This is the html element to trigger, you can obviously change it to what you want πŸ™‚




Leave a Reply