I am new to jquery. I have below the code to find out whether the check box is checked or not. But though the check box is checked it always goes to else block in below the code:
if ($('#someId').is(':checked')) {
alert("checked");
} else {
alert("unchecked");
}
Html code:
By default the check box is not checked. The code is as below.
<td>
select :<br><input type="checkbox" id="someId" name="someId" value="">
</td>
Am I doing anything wrong here? Thanks!
$(function() { /* your code here */ });