jquery check on change code example
Example 1: jQuery checkbox changed event
//jQuery listen for checkbox change
$("#myCheckBoxID").change(function() {
if(this.checked) {
//I am checked
}else{
//I'm not checked
}
});
Example 2: on change jquery
$("input").change(function(){
alert("The text has been changed.");
});
Example 3: jquery on element change
// On element change.
$('mydiv').bind('DOMSubtreeModified', function () {
console.log('changed');
});