I\'m trying to append new DOM objects to some Div and it works, but somehow - the events that I programmed for these new appended objects do not respond. Why is that?
$(document).ready(function(){ $("#add").click(function(){ $("#containerDiv").append(" I should hide as well if you click me "); }); $("body").on("click","p", function(){ $(this).hide(); }); });
I should hide as well if you click me