How to use Zurb Foundation reveal with open, opened, close, closed callback functions?

后端 未结 9 533
执念已碎
执念已碎 2021-02-05 01:41

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

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 02:17

    The foundation 5 documentation specifies scoping of reveal events to the 'reveal' eventspace. However, the actual modal events do not seem to fire consistently within this eventspace. Removing this specification fixes the issue:

    $(document).on('opened.fndtn', '[data-reveal]', function() {
      console.log('This works');
    });
    

提交回复
热议问题