Avatar of Moti Mashiah
Moti Mashiah
Flag for Canada

asked on 

Jquery key

HI Guys,

I have asp.net mvc application and I'm trying to use keydown and keyup function to let my user to travel between rows by entering buttons pageup\pagedown.

I did something like this:

which didn't work so far.

$(document).keydown(function (e) {
        //alert(e.keyCode);
        $('input').keyup(function (e) {
            if (e.which == 33) { 
                $(this).closest('td').next().find('input').focus();

            } else if (e.which == 34) {
                $(this).closest('td').prev().find('input').focus();
            }
        });
        
    });

Open in new window


Please any suggestions.

Thanks,
jQueryJavaScript

Avatar of undefined
Last Comment
Moti Mashiah

8/22/2022 - Mon