Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zurb Foundation Reveal Modal - preventing close on background click

When I am opening my Reveal Modal, I would like to prevent it from closing on background click (which is a default behavior).

I am using Zurb Foundation 5.0.2.

Any help would be appreciated.

like image 986
alexs333 Avatar asked Feb 21 '14 00:02

alexs333


2 Answers

If you set the closeOnBackgroundClick option to false then your modal won't close when you click in the background.

<div class="reveal-modal" data-options="closeOnBackgroundClick:false">
like image 93
Dave Sag Avatar answered Sep 17 '22 22:09

Dave Sag


Yehhhhh Finally Found It:

Put below code on your foundation reveal model. Than it not close by clicking on background or by pressing esc key.

data-options="close_on_background_click:false;close_on_esc:false;"

Ex:

<div id="AccessContainer" class="reveal-modal" data-reveal data-options="close_on_background_click:false;close_on_esc:false;">
</div>
like image 23
Rav's Patel Avatar answered Sep 18 '22 22:09

Rav's Patel