I need to keep track of indexes/rows that are selected. When a row is selected in a jqGrid, I have an event splice an array – add if selected, remove if deselected.
Is this wise? I just have a “doesn’t seem like a good idea” feeling, so I’m really just looking for some validation one way or another :).
I can’t think of a problem with it. A smart alternative might be to toggle a
.selectedclass, then access the elements using$('.selected')when you need to.