jquery.findIncludeSelf

jQuery plugin findIncludeSelf(selector) is the same as find(selector) but includes the subject node itself if it matches the selector


License
CC-BY-SA-3.0
Install
bower install jquery.findIncludeSelf

Documentation

jQuery.findIncludeSelf

GitHub version Build Status

Trivial jQuery plugin, $(root).findIncludeSelf(selector) is the same as find(selector) but includes the subject node itself, if it matches the selector.

Specifically:

$foo.findIncludeSelf(selector)

is shorthand for

$foo.find(selector).addBack(selector)

Testing

$ bower install
$ npm install
$ npm test

Release Notes

Credits

Taken from the stackoverflow answer provided by stackoverflow user Robert