Zurb Foundation 6 Reveal doesn't work

Try with

var popup = new Foundation.Reveal($('#popup-modal'));

and then:

popup.open();

$('#popup-modal').foundation('reveal', 'open'); doesn't work in Foundation 6 anymore.


Chris from ZURB here. There's a couple of ways you can invoke methods on plugins, see: http://foundation.zurb.com/sites/docs/javascript.html#programmatic-use

The easy "new" way now is

$('#exampleModal').foundation('open')

Both options provided by Juliancwirko & EddieDean are working. But there's a difference.

If you are using "new Foundation" approach and you also have data-options set like: data-options="closeOnEsc: false; closeOnClick: false;" they won't have any effect.

But if you are using foundation('open') they will work.