开发者

event contex for live function in jquery

开发者 https://www.devze.com 2023-01-09 03:22 出处:网络
HI , I am using JQuery 1.3 , I am facing problem in using live event as in jQuery DOM element \"context\" is bound to default document root. So how to overcome such thing?

HI ,

I am using JQuery 1.3 , I am facing problem in using live event as in jQuery DOM element "context" is bound to default document root. So how to overcome such thing?

From jQuery documentation:

As of jQuery 1.4, live events can be bound to a DOM element "context" rather than to the default document root. To set this context, we use the jQuery() function's second argument, passing in a single DOM 开发者_高级运维element (as opposed to a jQuery collection or a selector).


Either upgrade to 1.4, or write a plugin that provides a context with live events. Copy the source from jQuery 1.4 for that plugin if need be.


Upgrade to 1.4.2 and use $('#foo', '#bar').live().

0

精彩评论

暂无评论...
验证码 换一张
取 消