bind ajax to new dom function code example
Example: jquery click not working on ajax loaded content
$(document).on("click", '.mylink', function(event) {
alert("new link clicked!");
});
$(document).on("click", '.mylink', function(event) {
alert("new link clicked!");
});