Trigger an event when contenteditable is changed
<div class="changeable" contenteditable="true"> Click this div to edit it </div>
jQuery(document).ready(function($){
var contents = $('.changeable').html();
$('.changeable').blur(function() {
if (contents!=$(this).html()){
alert('Handler for .change() called.');
contents = $(this).html();
}
});
});
Comments
Post a Comment