0

I created a fixed width fancybox defined on the parent page like so:

$('.fancybox').fancybox({
    width: 650
});

I have a link that can be clicked within the iframe that pops up that directs to a new page that is 850px wide. I need the FancyBox to adjust up to that width. How can I do this? I've tried using the autosize:true function but that does not seem to do the job.

4

3 回答 3

1

With jQuery you can do:

$(".fancybox").css({"width" : "850"});

right after your Fancybox call.

于 2013-01-25T03:21:14.073 回答
1

You could also do this, assuming that the new content has a size set:

$('#fancybox-wrap, #fancybox-outer, #fancybox-content').css('width', 'auto');
$.fancybox.center();
于 2013-05-04T23:13:52.550 回答
0

You can call:

$('#fancybox-content').width(850);

To resize the width of the fancybox at any time.

于 2013-01-25T04:13:30.553 回答