How can I run a function on checkbox change?
I\'m trying to write small checkbox replacing function base on that - but I\'m doing something wrong.
Code:
Try this:
$('input[type=checkbox]').change(function() { alert("I'm changed!"); });
Or
$('input[type=checkbox]').change(function() { if ($(this).is(':checked')) { alert('I\'\m --> checked'); } else { alert('I\'\m --> unchecked'); } });