Search code examples
jquerycolorbox

How can I dynamically resize the jQuery Colorbox plugin?


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?

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/thread/535d21c69e9006b0


Solution

  • In Colorbox 1.3, you can now call the resize function:

    $('.item').colorbox.resize();