jackmoore / colorbox

A light-weight, customizable lightbox plugin for jQuery
http://www.jacklmoore.com/colorbox/
MIT License
4.75k stars 1.14k forks source link

Cut off of bottom of modal problem #824

Closed ash-f closed 7 years ago

ash-f commented 7 years ago

Sometimes bottom of modal is cut off somehow especialy when open first time on the page. I used this method still doesn't fit to proper size. onComplete:function(){ $.colorbox.resize(); }

Loading content from wordpress' ajax api.

Might be related to internet connection speed?

jackmoore commented 7 years ago

See this FAQ: http://www.jacklmoore.com/colorbox/faq/#faq-img

The best fix would be to add width and height attributes to your IMG elements. If you are unable to do so, you could change the onComplete function to query the number of IMG elements, then call colorbox.resize once the onLoad even has fired for each of those elements.

Hope that helps. If that's not the problem, feel free to reopen this ticket and provide a link that demonstrates the problem.