Reputation: 4865
I was just wondering why this isnt working:
$('#down-a-bit').mousedown(function(){
setTimeout( $('html, body').animate({ scrollTop: $(this).offset().top += 1}) ,300);
});
What am I doing wrong? Any help would greatly be appreciated, Thanks
Upvotes: 0
Views: 541
Reputation: 6770
You can use .delay instead of setTimeout. If you use setTimeout, wrap it in a function.
Upvotes: 1