jQuery Listen
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/Listen
软件介绍
The release shown below is not the last. Please check 1.0.3 instead.
This plugin brings a clean, light solution, to websites with dynamic loaded content, or full of event bindings.
Intead of bound, handlers for events, are registered along with matching selectors.
And they'll still work for new added content.
This is achieved, using Event delegation, so the plugin will only work for events that bubble.
Update: jQuery.Listen can now handle both focus and blur events thanks to the focusin/focusout workaround.
Many thanks to Jörn Zaefferer for lending me the code!.
The plugin supports these kind of selectors:
- #id
- nodeName
- .class
- nodeName.class
- a comma-separated selector combining these 4.
I plan to add more support, but perfomance and scalability are my priorities. These simple selectors give enough functionality for many cases.
If, for example, you want tables, to react to clicks on it's rows, then you can do this:
jQuery('table').listen( 'click', 'tr', function(){
alert('you clicked a row!!');
});
No matter how many times you add/remove rows, they will still be clickable.
You can also do this:
jQuery.listen( 'click', 'tr', function(){
alert('you clicked a row!!');
});
This time, the listener will be the document. So now you can add/remove tables as well, clicking the rows will still trigger the handler.
If you need full support for selectors, and you mind sacrificing a little of scalability, you can check http://plugins.jquery.com/project/Intercept for a similar solution.
互联网+秋叶课堂:我的网课创业
秋叶 / 北京:机械工业出版社 / 2016-3-1 / 39.0
在线教育被很多人视为 “互联网+”创业热潮中的下一个风口,越来越多的老师和创业者选择在线教育创业。本书作者秋叶老师2013年双11正式带一帮小伙伴开始在线教育创业,在短短两年内“从0到1”,累计做到了超500万元的销售业绩,成为国内Office领域在线教育运营最成功的团队之一。在这本书中秋叶老师结合自己的实战经历,向各位完整剖析了两年创业的真实复盘思考,是一本值得在线教育创业同行入手的必读书。 ......一起来看看 《互联网+秋叶课堂:我的网课创业》 这本书的介绍吧!
