I was using Colorbox for some lightbox type effects to show larger images when clicking on thumbnails, but for some reason the background was showing up but the pretty little box in the middle where the larger image is supposed to show never showed up, so this is how I made it finally appear after many failed attempts!

[code lang=”javascript”]
$(“.theCssClass a[rel=’forGroupingRelCodeGoesHere’]”).colorbox({ onLoad: function () { $(“#colorbox”).show(); } });

So the “real” code that fixed it was the:
[code lang=”javascript”]
{ onLoad: function () { $(“#colorbox”).show(); } }

This worked because the DOM was loading all the right things but the actual main parent element of the colorbox wasn’t changing it’s CSS to show the image.

Categories: ContentGeneral

Leave a Reply

Your email address will not be published. Required fields are marked *