I've searched similar topics on SO but none of the solutions worked for me. I'm populating my page with links via Ajax. Like so:
$.post('php/common/auction_view/auction_invoices.php', function(data){
$('#auction-invoices').html(data);
//Initiate Fancybox on links
$("a.example4").fancybox({
'opacity' : false,
'overlayShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'type' : 'iframe'
});
});
Although, this doesn't work. Does anyone have a solution? Thanx!
EDIT: Okey, found the solution:
$.post('php/common/auction_view/auction_invoices.php', function(data){
$('#auction-invoices').html(data);
$.getScript("fancybox/jquery.fancybox-1.3.4.js", function(){
$.fancybox.init();
$("a.example4").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'overlayShow' : false,
'showCloseButton' : true,
'width' : 450,
'height' : 585,
'titleShow' : false,
'type' : 'iframe'
});
});
});
enter code here