Skip to content

Instantly share code, notes, and snippets.

@kenzik
Forked from gacha/colorbox-title-hack.js
Created October 28, 2013 17:48
Show Gist options
  • Save kenzik/7201335 to your computer and use it in GitHub Desktop.
Save kenzik/7201335 to your computer and use it in GitHub Desktop.
$(document).bind('cbox_complete', function(){
if($('#cboxTitle').height() > 20){
$("#cboxTitle").hide();
$("<div>"+$("#cboxTitle").html()+"</div>").css({color: $("#cboxTitle").css('color')}).insertAfter("#cboxPhoto");
$.fn.colorbox.resize();
}
});
@kenzik
Copy link
Author

kenzik commented Oct 28, 2013

$('a[rel*=colorbox]').colorbox({onComplete:function(){
  $("#cboxTitle").hide();
  $("#cboxLoadedContent").append($("#cboxTitle").html()).css({color: $("#cboxTitle").css("color")});
  $.fn.colorbox.resize();
}})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment