181
rated 0 times
[
188]
[
7]
/ answers: 1 / hits: 26228
/ 10 Years ago, sat, may 24, 2014, 12:00:00
I have a JS to make a smooth scroll from the bottom of the page to the top with this and it works:
<script>
$(a[href='#top']).click(function() {
$(html, body).animate({ scrollTop: 0 }, slow);
return true;
});
</script>
But now I want to make a smooth scroll from the top to the bottom, I tried it with this:
<script>
$(a[href='#footer']).click(function() {
$(html, body).animate({ scrollToBottom: 0 }, slow);
return true;
});
</script>`
It doesn't work, it's not a smooth scroll. Does anyone know what's wrong with this?
More From » jquery