I have a a
element that triggers an action when clicked:
<a href="#" class="hel" onclick="YPCP1_();">Scroll down</a>
Also,
function YPCP_(){
var scroll = $(window).scrollTop();
window.scrollTo(0, 600);
}
The function successfully scrolls down to position 600
. However, it currently jumps directly to position 600
, but I would like it to slide down instead. For example,
slide down and reach position 600 in 6 seconds
.
I hope this explanation is clear. Thank you in advance! ( '_' )