私のモーダルに問題があります。ブートストラップモーダルjqueryが機能しません
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
ボタン:
<button type="button" class="btn btn-primary" data-toggle="modal"
data-target="#mdProduction">production</button>
モーダル:
jqueryの:
$('#mdProduction').on('hidden.bs.modal', function() {
alert("Hello World!");
})
しかし、私はすべてのアラートを得ることはありません。 私も "window.alert"を試しましたが、どちらもうまくいきません。
これは単なる例です。 私が望むのは、モーダルが隠されたときに関数をトリガーすることです。
ご回答ありがとうございます。
私は、問題が何であるかと思います。 (編集を参照)。私はjquery 1.12.0を使用しています –
https://github.com/twbs/bootstrap/blob/v3.3.7/bower.jsonがあるので、ブートストラップの最小バージョンは1.9.1です。あなたの問題を示すために小さなjsfiddleを共有できますか? –
私は使用したバージョンを試しましたが、動作しません。 そして私は以前に何か他のもので問題を抱えていませんでした。 –