Hello! I made a scroll with javascript . After clicking a button it goes up and another one goes down. But I did not like to leave 2. I would like to use a single button to go to the top and another pro end .
The Code:
$(document).ready(function(){
$("#scroll").click(function(){
$('html, body').animate({scrollTop:0}, 'slow');
});
$("#scroll").click(function(){
$('html, body').animate({scrollTop:$(document).height()}, 2000);
return false;
});
});