swluken/TouchTreeGrid

How to get neighboring cells

Closed this issue · 0 comments

Hi Steve,

I'd like to ask you for a method to get neighboring cells. Let me explain better:

When a cell is tapped, I highlight it adding a custom class .touchtreegrid-simplelist-cell-active to it. Then I have arrow buttons (up/down/left/right) to navigate between cells.

When I tap a button, I would love to know how you would unmark (remove the active class) the current selected cell, and highlight the adjacent one. My main problem is that I don't know how to access the DOM element of the adjacent cell.

Thank you