jquery.live 的一个好的 yui 替代品是什么
jQuery.live
在 jQuery 1.3 中添加:将处理程序绑定到所有当前和未来匹配元素的事件(如单击)。还可以绑定自定义事件。
http://docs.jquery.com/Events/live
有没有一个好的 YUI 替代品可以这样做吗?
jQuery.live
Added in jQuery 1.3: Binds a handler to an event (like click) for all current - and future - matched element. Can also bind custom events.
http://docs.jquery.com/Events/live
Is there a good YUI replacement which can do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 YUI3 中,委托执行此功能。以下代码片段将在正文中的任何“p”标记上触发名为“clickHandler”的方法。
YUI 2.8.0 也具有 委托 功能,但语法略有不同。
In YUI3, delegates perform this function. The following snippet will fire a method called "clickHandler" on any 'p' tag in the body.
YUI 2.8.0 has delegate functionality as well, but the syntax is slightly different.