It is necessary that when you hover on a specific block, the handler for clicking on the down and up arrows works, but I don’t even understand how to implement it.
$(document).ready(function() { $('div.test').on('mouseover', function() { $('div.test').html('Навели курсор на блок'); $('div.test').bind('keydown', function(e) { switch(e.keyCode) { case 38: $('div.test').html('Стрелка вверх'); break; case 40: $('div.test').html('Стрелка вниз'); break; } }); }); });