Closed (cannot reproduce)
Project:
Colorbox
Version:
7.x-2.3
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2013 at 13:19 UTC
Updated:
9 Apr 2020 at 12:57 UTC
Jump to comment: Most recent
Comments
Comment #1
jdln commentedThe function required is:
$.colorbox.resize
However im having an issue of when to call it. If I listen for the cbox_complete event then its fired before the content is loaded with AJAX, so the height is treated 0. The timeout function below seems to work but its not completely robust and the time delay isnt the best user experience:
$(document).bind('cbox_complete', function(){
setTimeout($.colorbox.resize,1000);
});
Comment #2
jdln commentedPutting this in the tpl file of the content type thats loaded in the overlay works:
(function($) {
Drupal.behaviors.global_custom_two = {
attach : function(context, settings) {
$.colorbox.resize();
}
}})(jQuery);
Comment #3
jdln commentedI spoke too soon. In IE8 the size jumps around and then ends up being too small. In IE9 and chrome the size jumps around but does ends up correct.
Comment #4
neslee canil pinto