Reputation: 7110
I'm using JQuery to POST a form. I'm having trouble getting the proper value from this field:
<input type="checkbox" name="facebook" value="true" checked="checked" id="facebook"/>
My JQuery:
var facebook = $("input#facebook").val();
I realize now that I'm getting the value with is always "true" regardless of being checked or not. So how do I get whether it's checked or not?
Upvotes: 2
Views: 2789