Reputation: 9317
How to check if checkbox is selected or not in jMobile using js?
<input class="custom" id="myCheckbox" name="myCheckbox" type="checkbox"/>
Upvotes: 7
Views: 7084
Reputation: 1
If it is checked you can use
if( $("#myCheckbox").is(':checked'));
And if it is NOT checked you can use
if( $("#myCheckbox").not(':checked'));
Upvotes: 0