Fancybox 2: Remove caption / title

I was testing out Fancybox 2 from Fancyapps and although they have some good documentation on their website I was unable to hide the title / caption when showing an image:

Remove caption / title on Fancybox 2

After playing around with the code for a bit I got it working using this. It is a little hackish but it did the trick:

jQuery(function($){

var fancyBoxOptions = {

closeBtn : true
,arrows : false
,nextClick : true

,afterClose : function() {
jQuery(‘#wpadminbar’).show();
}

}
jQuery(‘.fancybox’).fancybox(fancyBoxOptions);

});

They have this code listed on their website but it did not work for me:

//Disable title helper
$(“.fancybox”).fancybox({
helpers: {
title: null
}
});

//Disable overlay helper
$(“.fancybox”).fancybox({
helpers: {
overlay : null
}
});

Related Posts:

This entry was posted in Tech Tips, Web Development and tagged , , . Bookmark the permalink.

Leave a Reply

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