check this https://jsfiddle.net/qh2pfhjy/
I am create a div on the fly but click function doesn't work.
Any idea?
Also my code is:
$("#helloDiv").click(function(){
alert("The paragraph was clicked.");
});
$(document.body).append('<div id="helloDiv">Edit me</div>');