I insert element from the php file as a result of successful ajax call. But for some reason that and everything in it is missing when I look at my source code of the page. It
Look at jQuery.on()
Delegate the click event of your delete div Eg-
delete div
$(document).on("click",".btn",function(){//bind click event for all .btn type alert("clicked"); });