As of my below code, it does not load the fancy box after the AJAX response when clicking the link.
Id of the <a>
tag is generated dynamically.
But when i click the same link in the second time it loads but AJAX function also is getting recalled.
$(document).ready(function()
{
$(".cont").live('click',function(e)
{
//Cancel the default action (navigation) of the click.
e.preventDefault();
var contentId = $(this).attr('id');
$('#apps').load('/app/get-app-details', function(){
$("#"+contentId).fancybox();
});
});
});
<a class="cont" href="#device_detection" id="apps_<?= $regUsers->id; ?>"> Click to view apps</a>
Please provide me a solution.