$("#checkbox").click(function(evt){ $status = $('input').is(':checked'); if($status == false){ $arr = confirm('FALSE?'); if($arr == true){ $(this).attr('checked', false); } else{ $(this).attr('checked', true); } } else{ $arr = confirm('TRUE?'); if($arr == true){ $(this).attr('checked', true); } else{ $(this).attr('checked', false); } } });