ajax when content is loaded event 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!");
});