On zurb foundation\'s website at http://foundation.zurb.com/docs/reveal.php they listed some Options including
open: callback function that triggers \'before\' the
On Zurb Foundation v6, these events were renamed to xxx.zf.reveal
:
- closeme.zf.reveal Fires immediately before the modal opens. Closes any other modals that are currently open
- open.zf.reveal Fires when the modal has successfully opened.
- closed.zf.reveal Fires when the modal is done closing.
Source: http://foundation.zurb.com/sites/docs/reveal.html#js-events
Generic callback that will fire for all modals:
$(document).on('open.zf.reveal', '[data-reveal]', function() {
console.log('This works');
});
Callback that will fire when a specific modal is opened:
$(document).on('open.zf.reveal', '#[data-reveal]', function() {
console.log('This works');
});