0
JavaScriptsファンデーションプラグインの使用、reveal(モーダル)。私は非常に基本的なモーダルを働かせようとしていますが、私はそれを正しく呼んでいるとは思いません。私のベンダーのディレクトリには、foundation.min.js
とfoundation.reveal.js
のコピーがあり、私はちょうどウェブサイトhttp://foundation.zurb.com/sites/docs/reveal.htmlの最初の初心者の例を使って仕事をしようとしています。JavaScript Foundation公開モーダルレンダリング
私のindex.html
<!DOCTYPE html>
<html>
<head>
<title>Testing Foundation</title>
<script type="text/javascript" src="vendor/jQuery.js"></script>
<script type="text/javascript" src="vendor/foundation.min.js"></script>
<script type="text/javascript" src="vendor/foundation.reveal.js"></script>
<script type="text/javascript" src="testing.js"></script>
</head>
<body>
<p><a data-open="exampleModal1">Click me for a modal</a></p>
<div class="reveal" style="visibility: hidden" id="exampleModal1" data-reveal>
<h1>Awesome. I Have It.</h1>
<p class="lead">Your couch. It is mine.</p>
<p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p>
<button class="close-button" data-close aria-label="Close modal" type="button">
<span aria-hidden="true">×</span>
</button>
</div>
</body>
</html>
testing.js
$('#exampleModal1').foundation('open');
私はこれが動作するために、私は私のセットアップで間違ったつもりだ場所がわからないのですか?
感謝。私はこれも気付き、divをindex.htmlに戻そうとしていました。しかし、私はまだモーダルを働かせることができませんでした。私はまた、実際にポップアップするようにdivの可視性を隠して設定しましたか?ページを読み込むと、私は既にdivの内容を見るので。 – adamscott
@adamscottモーダルが隠され、モーダルが機能するために必要なリンク先のfoundation.cssファイルがないようです。 –
インラインスタイルはうまく動作しますが、あなたが言っていることを見て、今もそれを含めましたが、まだ動作していません。 – adamscott