{{#markdown}} ```javascript // trigger by event $('a.reveal-link').trigger('click'); $('a.close-reveal-modal').trigger('click'); // or directly on the modal $('#myModal').foundation('reveal', 'open'); $('#myModal').foundation('reveal', 'close'); ``` {{/markdown}}

Or you can call one right after the other:

{{#markdown}} ```html
I'm the firstborn! Click me!
I'm the secondborn! Close modal
Click me! ``` {{/markdown}} {{#markdown}} ```javascript // There's no need to close a previous modal before you // open another one. $('a.open-first').on('click', function() { $('#first-modal').foundation('reveal','open'); }); $('a.open-second').on('click', function() { $('#second-modal').foundation('reveal', 'open'); }); $('a.close').on('click', function() { $('#second-modal').foundation('reveal', 'close'); }); ``` {{/markdown}}