Intercept
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/Intercept
软件介绍
This plugin simplifies the use of Event Delegation with multiple different descendants.
This concept is very useful for pages with dynamic content (f.e: AHAH) where DOM elements are created and removed constantly, requiring re-binding.
This method also saves a lot of resources, as it uses less event handlers to achieve the same objective.
It can be used in 2 ways:(I will exemplify with a table)
$('table')
.intercept('click', 'tr', function(e){...})
.intercept('click', 'td.happy', function(e){...})
.intercept('click', '#something', function(e){...});or
$('table').intercept('click', {
tr: function(e){...},
'td.happy': function(e){...},
'#something': function(e){...}
});By calling intercept on the same element/event, the new handler/s are appended to the old list.
jQuery.Intercept won't have such a good perfomance when many different selectors are registered to one element, this can be noted for events that are triggered very often, like mouseover. If you need more scalability, and you can handle your problem with simpler selectors. Then you should check jQuery.Listen instead, for a similar approach.
Since 1.1.2, "absolute" selectors are supported, that is, selectors that specify parents, descendants, siblings. Just use it the way it's normally used.
Thanks to Michael Grosser for bringing up the idea.
互联网产品运营:产品经理的10堂精英课
丁华、聂嵘海、王晶 / 电子工业出版社 / 2017-5 / 59
《互联网产品运营:产品经理的10堂精英课》共有10章,前9章分别从互联网产品运营的9个点入手,最后一章辅以案例,分析当下市场热门产品的运营模式。 第1章点明在运营产品之前需要经过缜密的策划,这样才能有明确的运营方向;第2章讲述产品运营的定位,有了准确的定位,运营才不会走偏;第3章描述用户运营,用户是一款产品的根本,没有用户,产品就是死的;第4章讲述内容运营的技巧,产品内容要怎么运营才能受到用......一起来看看 《互联网产品运营:产品经理的10堂精英课》 这本书的介绍吧!
