jquery - Find location of a checkbox inside a table -
I have a table that has a check box within TDS. Checkboxes have AIDS which make an array (S [1], S [2], S [3], S [4], etc ...) and I try to find the numerical row position of the checkbox I am going to the table> Dune (Yes, this line location also matches the index inside the array. Here is the code I am trying to get but the result is always "0":
$ ('Input: checkbox') .bind ('change', function () {var thisRow = $ ('tbody tr'). Index (); $ ('input: text [id = qty [' + thisRow + '] '). Attr (' Focus; Warning (this cry);});
How about:
$ ('Input: checkbox Bind ('change', function () {var thisRowindex = $ (this) .clostest ("tr") [0] .rowIndex; ...
Demo:
Comments
Post a Comment