I want to use jQuery to select an element that has been added to an editable div. This does not work right now because the element was not present when the page loaded. How to tell jQuery that the div has been updated?
See this jsfiddle for test code: http://jsfiddle.net/kthornbloom/sjHYQ/
$(document).ready(function() {
<!-- This wont work on an image dragged into the div after page load -->
$('#editor img').click(function(){
$(this).fadeOut();
});
});
I saw other questions about this, but none of them relate to the contents of an editable div.
source
share