Link to home
Create AccountLog in
Avatar of Moti Mashiah
Moti MashiahFlag 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,
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Moti Mashiah

ASKER

Thank you very much that was solving my issue.