Zurb Foundation Reveal Modal - preventing close on background click

alexs333 picture alexs333 · Feb 21, 2014 · Viewed 13.7k times · Source

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.

Answer

Dave Sag picture Dave Sag · Feb 24, 2014

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