I\'m using Colorbox to show the html content of hidden divs on my page. I can get this to work perfectly with the following:
$(\"a.colorbox\").colorbox({width:\
This is the way I got it to work
HTML: (taken from the example in one of the answers)
Lightbox trigger
Lightbox content goes here
Javascript:
$('a.lightboxTrigger').click(function(){
var ref = $(this).attr("href");
$.colorbox({ html: $(ref).html() });
$.colorbox.resize();
});