Take the 2-minute tour ×

In jquery colorbox demo page itself, you can see that before loading the popup in correct height and width one empty pop up will be loaded with some 600*500 (approx.) size. and then it will be resized automatically according to the content size.

Whether we can change this default behavior. That i don't want to show the empty popup and then resize to actual width and height.

Note:I don't have any images in the popup content. it's just form fields wrapped in table and div tag.

share|improve this question
can you provide us with some code examples? –  ClydeFrog Jun 25 '12 at 9:22
@ClydeFrog, here is my code $.colorbox({inline:true, iframe: false,href: '#jsCommentsBox',height: '220px', width: '500px', transition: 'fade', opacity: 0.4 }); –  Kumar Jun 25 '12 at 10:11
add comment

1 Answer

I'd assume setting the initialWidth and initialHeight to zero should get you what you're after. Otherwise, the source is on Github, so you could always modify the source to load differently.

If it's the blank white content that's bothering you, you might be able to use Mike Alsup's BlockUI (http://jquery.malsup.com/block/) plugin to show a loading animation within the pop-up.

share|improve this answer
Thanks, Tieson i have set the initialWidth, initialHeight as same as my content height and width. Now empty pop up comes in the same size of my popup, but i wants to completly avoid the first empty pop up, as my inline content is loading immediately in the popup. –  Kumar Jun 25 '12 at 10:20
add comment

Your Answer


