How can I dynamically resize the jQuery Colorbox plugin?

前端 未结 16 1657
情书的邮戳
情书的邮戳 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:32

    resize actually takes a jQuery object and uses that to do the resizing. Instead, you can just have the colorbox reload like this:

    $(window).resize(function(){
        $.fn.colorbox.load();
    }); 
    

提交回复
热议问题