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

Popular posts from this blog

angularjs - Showing an empty as first option in select tag -

python - argument 2 to map() must support iteration -

javafx - How to wait cancellation of task after Service#cancel? -