开发者

event contex for live function in jquery

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜