Hi, I used your code but still it's the same problem: If the box appears the up and down keys will do nothing. It would be nice, if you take a quick look at http://igf-project.igf.uos.de/~bhempen/index_tomaten.html where you can see the problem.
regards m.sirin On 11 Jan., 01:27, Šime Vidas <sime.vi...@gmail.com> wrote: > Actually, this is right... > > $().keydown(function(e) { > var $item = $(".selected"); > if (e.keyCode === 40) { // bottom > if ($item.next().is("li")) { > $item.removeClass("selected").next > ().addClass("selected"); > alert($item.get(0).innerHTML); > } > } else if (e.keyCode === 38) { > if ($item.prev().is("li")) { > $item.removeClass("selected").prev > ().addClass("selected"); > alert($item.get(0).innerHTML); > } > } > }); > > });