How can I dynamically resize the jQuery Colorbox plugin?

前端 未结 16 1641
情书的邮戳
情书的邮戳 2020-12-13 14:14

The AJAX content loaded in a Colorbox has some JavaScript included that resizes things within the content. Colorbox determines its sizing based on the sizes before all of th

16条回答
  •  时光取名叫无心
    2020-12-13 14:45

    Not sure what you are looking for but I found this thread while on a quest for my own solution. I have a colorbox in iframe mode. There is a button in there that when clicked, needs to replace the current colorbox with a new one. I just do this...

    parent.$.colorbox({
        href: newurl,
        iframe: true,
        width: "600px",
        height: "240px",
        onClosed: function() {
        }
    });
    

    This reloads a new page into a new colorbox in the same location and the transition is very smooth.

提交回复
热议问题