apologies for question title not making too much sense.
I am trying to pass the checkbox from the current row to another function where that function checks if it is checked or not and performs accordingly.
I have a table with several rows, and when changing an input qty
I want the current row and checkbox name/id to be passed to another function.
you can see the example here
The html in this fiddle is what is generated by my php page onload.
I can get the onchange
to fire but the checkbox for that row is always unchecked
. I think this is because
var cb = $(this).siblings('input[name^="treated"]');
is not passing the correct object to the next function.
I did get some assistance from @pXL previously with this fiddle but whilst it works in this example, cant get it to work with my generated html.
so when changing qty, I want alert 1
to fire if the checkbox treated
is checked for that specific row. if it is not checked then alert 2
Thanks in advance.