1
Hello! I made one scroll with javascript. After clicking on a button he goes up and another he goes down. But I didn’t like to leave 2. I would like to use a single button to go to the top and another pro final.
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;
});
});
Do you want to do both actions with one button only ? The button goes to the top and then to the end ?
– Isac
Yeah. I got it here.
– OliverDamon