Jquery delegate() deprecated , then how to listen dynamic create object event
FOR Example
$(document).ready(function() {
$(document).find("p").on("click", function(event) {
$("#contain").append("<p>Click this paragraph </p>" + event.timeStamp);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<p>Click this paragraph.</p>
<div id="contain"></div>
Here contain>p click event not happened with on
event delegate is working is there any idea for this instead of delegate() or live() ?