How To Catch Single And Double Click On A Checkbox
I have a mastercheckbox in my jqgrid columnb header. The requirement is like on single click one pop up has to be shown and if I double click on the same mastercheck box, I have to
Solution 1:
$('#checkbox1').on('click',function() {
});
$('#checkbox1').on('dblclick',function() {
});
//dunno whether dblclick triggers for checkbox... //better use change event
Solution 2:
$('#checkbox1').on('change',function() {
if($(this).is(":checked"))// behave like click
{
// do your stuff
}else{// behave like double- click
// do your stuff
}
});
reference change
See DEMO
Post a Comment for "How To Catch Single And Double Click On A Checkbox"