user1662658
user1662658

Reputation: 93

close button disappears while using modal fancybox(1.3.4)

I am using fancybox with jquery for iframe. I set modal to true but the close button disappears. i read the documentation and use the convention "When true, 'overlayShow' is set to 'true' and 'hideOnOverlayClick', 'hideOnContentClick', 'enableEscapeButton', 'showCloseButton' are set to 'false'" but close button disappears.

Upvotes: 2

Views: 2130

Answers (4)

Rafiqul Islam
Rafiqul Islam

Reputation: 1646

Place close image icon named fancybox_sprite.png in css directory.

Upvotes: 0

Babar Sajjad
Babar Sajjad

Reputation: 195

When "modal": true then You can append the close button in the after show event like

afterShow : function() { $('.fancybox-skin').append(''); }

Hope this will help

Upvotes: 1

Popescu Andrei Vlad
Popescu Andrei Vlad

Reputation: 21

Please read my article here. http://anvlpopescu.wordpress.com/2013/12/10/jquery-fancybox-modal-iframe-with-close-button/

There is an workaround for this.

Upvotes: 1

JFK
JFK

Reputation: 41143

You may need to read the documentation again (and slower perhaps) and understand that when modal is set to true (as you wrote above), then showCloseButton is set (automatically) to false.

"showCloseButton": false ("modal": true) means that the close button doesn't show up and that is the expected behavior.

Upvotes: 0

Related Questions