Hi i’m planning to make a ul li list and make it navigable highlighting the <li> items
so starting from:
<ul>
<li>
<a class="a">hey</a>
</li>
<li>
<a class="a">hey you!</a>
</li>
<li>
<a class="a">hey what's up?</a>
</li>
<li>
<a class="a">hey hey</a>
</li>
</ul>
i would like to navigate <li> items in this way:
- User clicks key ‘down’ (as for autocomplete lists) and he enter the
<ul></ul> - User clicks key left/right and he highlight the +1 or -1
<li>item - User clicks key up and he exit the
<ul></ul>
is there someone can help me on doing this?
ohohoho 🙂 i just founded the perfect example : take a look at stackoverflow tags input autocomplete list 🙂 (it’s the same thing i would like to do for my ul item 🙂 )
Not sure where exactly you want to listen for
keydownevents, but this works for the entiredocument:Example: http://jsfiddle.net/WeNdW/