[英]Jquery on equivalent in 1.3.2 version
I am using jquery version 1.3.2 , I just want to know what is the equivalent of "on" in 1.3.2. 我正在使用jquery版本1.3.2,我只想知道1.3.2中“ on”的等效项。 I have used live but it giving the error
我用过直播但给了错误
Error Code: 5272 Message: 'this.chartLoad' Type: Javascript Error Description: Cannot read property 'guid' of undefined LineNumber: 0 Url: appears in firebug .
错误代码:5272消息:'this.chartLoad'类型:Javascript错误描述:无法读取未定义LineNumber:0的属性'guid'网址:出现在firebug中。
I want to use on equivalent because my current jquery version is 1.3.2 so what function can i use instead of on 我想在等效项上使用,因为我当前的jquery版本是1.3.2,所以我可以使用什么功能代替
please help................... 请帮忙...................
Use the .bind()
method. 使用
.bind()
方法。 From the documentation , as of jQuery 1.7, the .on()
method is the preferred method for attaching event handlers to a document. 从文档开始 ,从jQuery 1.7开始,
.on()
方法是将事件处理程序附加到文档的首选方法。 For earlier versions, the .bind()
method is used for attaching an event handler directly to elements. 对于早期版本,
.bind()
方法用于将事件处理程序直接附加到元素。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.