[ACCEPTED]-Hide the close "X" button in Fancybox-fancybox

Accepted answer
Score: 51

Looks like showCloseButton doesn't work any more. After 4 looking into the fancybox code i figured 3 out closeBtn should be set to false.

So in order 2 to hide close button one should add below 1 line in options -

'closeBtn' : false

Score: 21

If you take a look at the documentation 3 at http://fancybox.net/api it cites an option of showCloseButton that should do 2 the trick.

From the site:

showCloseButton 1 - Option to show/hide close button

Score: 2

In fancybox 3 use 'modal' e.g.

        $.fancybox.open({
            ...
            opts: {
                modal: true,
            }
        });

0

Score: 1

For those who are looking for disable it 1 completely in fancybox v3, here it is:

smallBtn: false,
toolbar: false
Score: 0

use boolean in 'showCloseButton' attribute. e.g

$('.editGnBtn').fancybox({
   'href': "#editGn",
   'showCloseButton':false
 });

0

Score: 0

You can add the following in ... .fancybox-close {display:none; }

But it 3 is advisable only if the same fancybox is a popup 2 which will automatically disappear after 1 some time (using $.fancybox.close();)

More Related questions