function Share(url,a) { var url; var a; $.fancybox(
{ 'href': 'add.php' },
{
frameWidth: 750,
frameHeight: 430,
overlayShow: true,
ajax: {
type: "POST",
data: 'url='+url+'&a='+a
}
}
);}
fancybox is working only first page , another pages with not work
i using 1.3.4 version and calling Share function is :
<div class="Share"><a onclick="Share('<?=$url?>','<?=$a?>');return false;"href="#"><img src="play.gif" border="0"></img></a></div>
i use a fancybox for search results,next page function is here :
function page(p) {var serialized = $('form#searc').serialize(); $('#p').html('<img src="spinner.gif" border="0">');$.ajax({type:'POST',url:'search.php',data:serialized+'&p='+p,success: function(pg) {$('.Results').html(pg);}});}
calling from
<div class="nxt"><a onclick="page('<?=$p+1;?>');return false;"href="#" >next</a></div>
I was facing same problem in fancybox where second click was not working for light box. I was getting error :- TypeError: t is undefined What i try is:- please set fancybox type as iframe and set its height & width accordingly.. it works for me.
jQuery.fancybox({
'href' :URL,
'type':'iframe'
});
I hope this will help you!
this error show when fancybox call before its file load, you can call fancybox after page load:
$(window).bind("load", function() { //call fancybox here });