Zurb foundation Zurb基金会5揭示模态不工作 我试图用Zurb基金会5揭示模式。但当我点击按钮时,它不工作也不打开。 我正在使用这个html代码 <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link type="text/css" rel="stylesheet" href="css/foundation.css" /> <link type="text/css" rel="stylesheet" href="css/normalize.css" /> <title>index</title> </head> <body> <div id="myModal" class="reveal-modal" data-reveal> <h2>Awesome. I have it.</h2> <p class="lead">Your couch. It is mine.</p> <p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p> <a class="close-reveal-modal">&#215;</a> </div> <a class="button" href="#" data-reveal-id="myModal">Click for a modal</a> <script src="js/vendor/jquery.js"></script> <script src="js/foundation/foundation.js"></script> <script src="js/foundation/foundation.reveal.js"></script> <script type="text/javascript"> $('#myModal').foundation(); </script> </body> </html> 指数 令人惊叹的。我有。 您的沙发。它是我的

Zurb foundation Zurb基金会5揭示模态不工作 我试图用Zurb基金会5揭示模式。但当我点击按钮时,它不工作也不打开。 我正在使用这个html代码 <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link type="text/css" rel="stylesheet" href="css/foundation.css" /> <link type="text/css" rel="stylesheet" href="css/normalize.css" /> <title>index</title> </head> <body> <div id="myModal" class="reveal-modal" data-reveal> <h2>Awesome. I have it.</h2> <p class="lead">Your couch. It is mine.</p> <p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p> <a class="close-reveal-modal">&#215;</a> </div> <a class="button" href="#" data-reveal-id="myModal">Click for a modal</a> <script src="js/vendor/jquery.js"></script> <script src="js/foundation/foundation.js"></script> <script src="js/foundation/foundation.reveal.js"></script> <script type="text/javascript"> $('#myModal').foundation(); </script> </body> </html> 指数 令人惊叹的。我有。 您的沙发。它是我的,zurb-foundation,Zurb Foundation,我是一个很酷的段落,生活在一个更酷的模式里面。获胜 $('#myModal').foundation(); 将最后一个脚本标记更改为: <script type="text/javascript"> $(document).foundation(); </script> $(document.foundation(); 您还忘记添加模式触发器: <a href="#" data-reveal-id="myModal">Click Me For A

我是一个很酷的段落,生活在一个更酷的模式里面。获胜

$('#myModal').foundation();
将最后一个脚本标记更改为:

<script type="text/javascript"> 
    $(document).foundation();
</script>

$(document.foundation();

您还忘记添加模式触发器:

<a href="#" data-reveal-id="myModal">Click Me For A Modal</a>

请参阅此处的文档:

它对我有用


令人惊叹的。我有。

您的沙发。它是我的

我是一个很酷的段落,生活在一个更酷的模式中。胜利

×
如果调用了
$(document.foundation(),您可能会遇到此问题在同一页上两次。

这很奇怪,当我运行您的代码时,它对我不起作用。