So I am using the down arrow key to set off a Jquery .animate() function. Currently, when the down arrow key is pressed, it does the animation, but also moves the browser page down. Is there a way for me to disable the downward movement set into action by pressing the down arrow key, but also have it call the .animate() function? My animate function is below..
<script>
$(document).on('keyup',function(evt) {
if (event.which == 40) {
alert('down key was pressed');
}
});
</script>
Thanks in advance!