pheromix pheromix - 3 months ago 11x
jQuery Question

How to make the close button of Fancybox invisible?

I do not want the user to be able to close the fancybox by clicking the default close button at the upper right corner :

enter image description here

$("a#ExporterSujetReponse", context).fancybox({
'onStart': function () {

loadDeverouillerSujetAvecReponse (this) ;

'onComplete' : function(){
$('#fancybox-content').removeAttr('style').css({ 'height' : $(window).height()-100, 'margin' : '0 auto', 'width' : $(window).width()-150 });

So how to make the default close button invisible ?


Use 'showCloseButton':false

$("a#ExporterSujetReponse", context).fancybox({
  'showCloseButton':false, // add this line to hide close button