Revealing a Modal in Foundation 4

前端 未结 4 1287
温柔的废话
温柔的废话 2021-01-15 03:24

How do you Reveal a modal programmatically in Foundation 4?

In Foundation 3 we had the easy to use reveal() method.

What can you use in Foundation 4? Please

4条回答
  •  囚心锁ツ
    2021-01-15 03:42

    I am pretty sure you can simply use the .foundation method on your modal to call 'open' on it.. Something like:

    $('#myModal').foundation('reveal', 'open');

    e: Just checked the docs and yep, It's right there: http://foundation.zurb.com/docs/components/reveal.html

    Look for "You can also open and close Reveal via JavaScript:"

提交回复
热议问题