Mootools 其实有个类似Jquery的live方法的东西
2015-07-10 16:50
776 查看
解决办法就是Mootools的 Element.Delegation
Element.Delegation的介绍:
Extends the Element type to include event-delegation in its event system.
Event delegation is a common practice where an event listener is attached to a parent element to monitor its children rather than attach events to every single child element. It's more efficient for dynamic content or highly interactive pages with a lot
of DOM elements.
用百度翻译一下:
将元素类型扩展为事件系统中包含事件委派。
事件代表团是一种常见的做法,其中一个事件侦听器被连接到父元素来监视它的孩子,而不是将事件附加到每个单独的子元素上。动态内容或高度互动的网页有很多DOM元素更有效。
然后你就参考手册吧
Element.Delegation的介绍:
Extends the Element type to include event-delegation in its event system.
Event delegation is a common practice where an event listener is attached to a parent element to monitor its children rather than attach events to every single child element. It's more efficient for dynamic content or highly interactive pages with a lot
of DOM elements.
用百度翻译一下:
将元素类型扩展为事件系统中包含事件委派。
事件代表团是一种常见的做法,其中一个事件侦听器被连接到父元素来监视它的孩子,而不是将事件附加到每个单独的子元素上。动态内容或高度互动的网页有很多DOM元素更有效。
然后你就参考手册吧
相关文章推荐
- JQuery1——基础($对象,选择器,对象转换)
- JavaScript演示排序算法
- jQuery Ajax 跨域调用
- jquery教程靠边站,一分钱不花让你免费学会jquery
- JQuery+Strusts1.x无刷新登录
- MooTools 1.2中的Drag.Move来实现拖放
- Mootools 1.2教程 函数
- Mootools 1.2教程 输入过滤第二部分(字符串)
- Mootools 1.2教程 Fx.Morph、Fx选项和Fx事件
- Mootools 1.2教程 Tooltips
- Mootools 1.2教程 正则表达式
- Mootools 1.2教程 定时器和哈希简介
- Mootools 1.2教程 排序类和方法简介
- Mootools 1.2教程(3) 数组使用简介
- Mootools 1.2教程 事件处理
- Mootools 1.2教程(21)――类(二)
- Mootools 1.2教程 输入过滤第一部分(数字)
- Mootools 1.2教程 类(一)
- Mootools 1.2教程 Fx.Tween的使用
- JQuery 初体验(建议学习jquery)