pheromix pheromix - 1 year ago 112
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 ?

Answer Source

Use 'showCloseButton':false

$("a#ExporterSujetReponse", context).fancybox({
  'showCloseButton':false, // add this line to hide close button
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download