How to trigger (use) an event when contenteditable is changed in jQuery?

Trigger an event when contenteditable is changed



Click this div to edit it
jQuery(document).ready(function($){
var contents = $(‘.changeable’).html();
$(‘.changeable’).blur(function() {
if (contents!=$(this).html()){
alert(‘Handler for .change() called.’);
contents = $(this).html();
}
});
});

The post How to trigger (use) an event when contenteditable is changed in jQuery? appeared first on wpcodekit.

Leave a Reply

Your email address will not be published. Required fields are marked *