我正在使用Bootstrap和jQuery,并且我已经获得了使用文本属性触发打开的模式内容工作正常。bootstrap和jquery模式失败
不过,我想从另一个脚本关闭打开的模式窗口,我得到的是modal is not defined
错误:
modals.js:94 Uncaught TypeError: $(...).modal is not a function(anonymous function) @ modals.js:94dispatch @ jquery.min.js:3r.handle @ jquery.min.js:3
modals.js:86 Object {__ob__: Observer, __v-for__1: Fragment}
的代码看起来是这样的:
$('#mymodal').modal('hide');
的加载顺序js文件是:
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.js"></script>
<script src="/modals.js" type="text/javascript"></script>
如果模态风未定义ow从data-toggle="modal"
电话正常工作?