I use this to scroll animate a page.
if (e.keyCode == 38)
$('div').animate({scrollTop:"-=50"},'5000', 'linear')
if (e.keyCode == 40)
$('div').animate({scrollTop:"+=50"},'5000', 'linear')
but I have to press and hold up or down arrow key to continuously animate. How can I make it to start animation on one press then increase speed when the same key (up or down) is pressed again
Thanks