Zurb Foundation Reveal Modal - preventing close on background click Zurb Foundation Reveal Modal - preventing close on background click javascript javascript

Zurb Foundation Reveal Modal - preventing close on background click


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">


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>


For anyone looking at this question in 2018, I'm using Version 6.4.0 and this works:

data-close-on-click="false" data-close-on-esc="false"

I added that to the reveal div like this and it's working (as of July 2018):

<div class="reveal" id="modalVideo" data-reveal data-close-on-click="false" data-close-on-esc="false">