jQuery Listen

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-09 09:29:47

软件介绍

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.

本文地址:https://codercto.com/soft/d/22986.html

数字战争

数字战争

[英]查尔斯·亚瑟 / 余淼 / 中信出版社 / 2013-6-1 / 49

1998年,数码世界初具雏形。 至此以往,大浪淘沙。随着IT产业的迅猛发展,涌现出了以苹果、谷歌、微软为首的行业巨头。它们为争夺数码世界不同分支的霸主地位而争斗,包括搜索技术、移动音乐、智能手机和平板电脑市场。它们可利用的武器包括硬件、软件以及广告。同时,它们要赌上的则是公司的声望,当然,还有我们的未来。然而,无论在产品创新还是在战略优势上,这些企业彼此竞争、彼此砥砺,推动了行业的良性发展。......一起来看看 《数字战争》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具