html - JavaScript undo onclick action? -
i have html checkbox. uses onclick javascript event increment integer var 1.
i want decrement var 1 if checkbox unchecked. how can this?
$('.checkbox').click (function(){ var thischeck = $(this); if ( thischeck.is(':checked') ) { // increment } else { // decrement } });
Comments
Post a Comment