How to get the check box state when it is changed. I am using zurb foundation
<label for="checkbox3"><input id="checkbox2" type="checkbox" name="chk[2]"></input>
<span class="custom checkbox" onclick="toggleState(2)"></span>
Check Box 1
</label>
But in function state prior to clicked is shown. How should i get the latest value Please Help
I would remove the onclick="toggleState(2)" and try some jquery code similar to:
Also, you should change your label to
<label for="checkbox2">
rather than<label for="checkbox3">
as an element with the id checkbox3 doesn't exist.It would also help if you could mention what version of Foundation you are using.