trollolodn

#jquery #confirm checkbox

Mar 20th, 2013
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.62 KB | None | 0 0
  1. $("#checkbox").click(function(evt){
  2.             $status = $('input').is(':checked');
  3.            
  4.             if($status == false){
  5.                 $arr = confirm('FALSE?');
  6.                 if($arr == true){
  7.                     $(this).attr('checked', false);
  8.                 } else{
  9.                     $(this).attr('checked', true);
  10.                 }
  11.             } else{
  12.                 $arr = confirm('TRUE?');
  13.                 if($arr == true){
  14.                     $(this).attr('checked', true);
  15.                 } else{
  16.                     $(this).attr('checked', false);
  17.                 }
  18.             }
  19.         });
Advertisement
Add Comment
Please, Sign In to add comment