Am trying to sortout this small issue from past hour :
<script type="text/javascript">
$(document).ready(function(){
$("input[name='isClubMember']:checkbox").mousedown(function() {
if (!$(this).is(':checked')) {
this.checked = confirm("Are you sure?");
$(this).trigger("change");
}
});
});
</script>
Funnily this works in JSFiddle ..but not in my jsp page. Sample
The above code gives me null error at this line (in Debug console)
$("input[name='isClubMember']:checkbox").mousedown(function() {
JQ -Ver : 1.7.2 Browser : IE8
Update : Error in IE console :
'null' is null or not an object
at the above mentioned line
changeinstead ofmousedownmousedown()should still be safe to call.changeis the same ..no luck