[英]Twitter Bootstrap 2 javascript plugins not working
Firebug is throwing these errors: Firebug正在抛出这些错误:
$(document).on is not a function | $(document).on不是函数| bootstrap.js (line 786):
bootstrap.js(第786行):
$(document).on('keyup.dismiss.modal', function ( e ) {
$("body").on is not a function | $(“body”)。on不是函数| bootstrap.js (line 139):
bootstrap.js(第139行):
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
And then the plugins don't work. 然后插件不起作用。
Any ideas on how to fix this? 有想法该怎么解决这个吗?
I'm loading jquery before bootstrap of course, so I don't know what's the problem. 我当然是在bootstrap之前加载jquery,所以我不知道是什么问题。 Jquery is working fine.
Jquery工作正常。
Nevermind, I was using a different version of jQuery. 没关系,我使用的是不同版本的jQuery。 Downloaded the latest version and it worked fine.
下载了最新版本,它工作正常。
.on()
在jQuery版本1.7中添加,并取代了delegate()
和live()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.