Link to home
Start Free TrialLog 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
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Moti Mashiah

ASKER

Thank you very much that was solving my issue.