$('a.scrolltop').click(function(e)
{
e.preventDefault();
$(document.body).animate({scrollTop: 0}, 800);
});
/*
<!-- Don't forget to create the anchor tag -->
<a class="scrolltop" href="#">⌃</a>
*/
Edit the milliseconds from 800 to desired length
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.