Jesper Jacobsen
Jesper Jacobsen

Reputation: 161

Navigation li with arrowkeys and entering with enter

I need help to click on the LI i get from a function, it's hard to explain and i have no idea why it does not work.. But the page is here http://japseyz.dk/Projects/Code/ (Type Razer in to search field).. You can navigate with the arrowkeys and the enter button should redirect you to the page, just like normal clicking does

Upvotes: 0

Views: 41

Answers (1)

balexandre
balexandre

Reputation: 75103

I don't know what are you testing for but the alert should be:

var test = $(".selected a").attr("href");   

instead of

var test = $(".selected:first-child").html();   

and then, replace alert(test) with document.location.href = test;

Upvotes: 1

Related Questions