I have a list of elements with the class .node-display
, when one is clicked it becomes an input. I want to capture the down or up arrow keyups to click the very next .node-display
in the list (relative to the current element).
In the below example, pressing down should click on item 5, and pressing up would click on item 3.
- 1
- 2
- 3
- 4 (Currently selected)
- 5
- 6
My best guess is something like this.
<input
_="on keyup[key is 'ArrowDown'] send click to the first .node-display end"
>
Does anyone know how I'd actually write this expression?