I have an editable ajax table , and have a “unlock” field with a checkbox for every row.
When I check the chekbox I need to get the value 1 ( I’m ok for this part ! 🙂
My code to get the value of the cheked box:
( $("#unlock_input_" + ID).val(); ) )
But when I uncheck one of any checkbox , I need to get the value 0 ( I need help for this part)
So…. How can I do that in jquery ? Thx
change your code to this (using prop to ask for the checked-property):
EDIT:
if you explicitly need the value instead of
1, just do: