this is my checkbox
HTML
<label class="checkbox">
<input id="eu_want_team" name="eu_want_team" type="checkbox">
</label>
JQuery
var eu_want_team = $('#eu_want_team').val();
alert(eu_want_team);
Its always displaying ON, is it checked or not. Whats the problem with it?
jQuery
, assuming that's where$()
andval()
come from. Feel free to correct it if I was wrong. And next time you ask about a non-native JavaScript function don't forget to post its code or mention what library it belongs to..prop('checked')
in jQuery