Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yougov/jquery.textnodes
Get all descendent text nodes from the set of matched elements.
https://github.com/yougov/jquery.textnodes
Last synced: about 2 months ago
JSON representation
Get all descendent text nodes from the set of matched elements.
- Host: GitHub
- URL: https://github.com/yougov/jquery.textnodes
- Owner: yougov
- License: mit
- Created: 2014-01-23T17:55:48.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-23T19:11:52.000Z (almost 11 years ago)
- Last Synced: 2024-05-02T00:07:39.875Z (8 months ago)
- Language: JavaScript
- Size: 234 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# jQuery.textNodes
Get all descendent text nodes from the set of matched elements.
Tested and working in IE6+*, Firefox 26 and Chrome 32.
_Note_: IE6+ are fine with non-whitespace-only text nodes, but IE < 9 do not
correctly get _whitespace-only_ text nodes. I don't know of any workaround.## Getting Started
Download the [production version][min] or the [development version][max].[min]: https://raw.github.com/yougov/jquery.textnodes/master/dist/jquery.textnodes.min.js
[max]: https://raw.github.com/yougov/jquery.textnodes/master/dist/jquery.textnodes.jsIn your web page:
```html
jQuery(function($) {
$('.something').textNodes();
});```
## Examples
Returns all descendent, non-whitespace-only text nodes from the matching
set of elements _(IE6+ and modern browsers)_:
```
$('.something').textNodes();
```Returns all descendent text nodes, including whitespace-only ones**, from
the matching set of elements _(IE9+ and modern browsers)_:
```
$('.else').textNodes(true);
```## Release History
* v1.0.0 Initial release