如何动态调整jQuery Colorbox插件的大小? [英] How can I dynamically resize the jQuery Colorbox plugin?
问题描述
在Colorbox中加载的AJAX内容包含一些JavaScript,这些JavaScript可以调整内容中内容的大小. Colorbox根据所有AJAX发生之前的大小确定其大小.加载内容后,如何调整Colorbox的大小?
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 the AJAX happens. How can I make the Colorbox resize after the content has been loaded?
这是一个链接,有人说可以在加载后再次调用colorbox(),但我不知道该怎么做:
Here is a link where someone said that you can call colorbox() again after it's been loaded, but I can't figure out how to do that:
http://groups.google.com/group/colorbox/browse_thread/线程/535d21c69e9006b0
推荐答案
在Colorbox 1.3中,您现在可以调用resize函数:
In Colorbox 1.3, you can now call the resize function:
$('.item').colorbox.resize();
这篇关于如何动态调整jQuery Colorbox插件的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!