I created a question yesterday to help me find the new index of a <tr>
or a <li>
once it has been moved using Jquery UI
drag & drop functionality, and this works perfectly :)
Something I did not think about however and have been trying to figure out this morning, is... How would I find the index
of the <tr>
or <li>
that is being shifted up or down.
EG: Given the below table, if I Move "email" into position 1, "other" will be shifted into index
of 2. How would I alert this value and its RefID ?
+--------+------------------+
| Ref ID | Issue relates to |
+--------+------------------+
| 9342 | Other |
| 9392 | CRM |
| 9394 | CRM |
| 9308 | eMail |
| 9365 | CRM |
+--------+------------------+
Here is a FIDDLE I have been playing with.
Thanks you in advance guys.
Mike
EDIT: So, I was just moving them around a bit more, and if you move another row above the ones we just moved, "Other" will now be in index
3. Yikes!! Getting more complicated for me as I look at this thing.