commit 2477adf263645be28ed7399318a3e78aa4e7144c parent 542423319831c39f04bc91e6e5f1caa624ab49d6 Author: Ryan Wolf <rwolf@borderstylo.com> Date: Wed, 5 Jan 2011 12:17:13 -0800 added is() Diffstat:
| M | windex.js | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/windex.js b/windex.js @@ -910,6 +910,13 @@ WindexNodes.prototype.prev = function () { return new WindexNodes([node.previousSibling], selector, context); }; +// See: http://api.jquery.com/is/ +WindexNodes.prototype.is = function (selector) { + return this.some(function (node) { + return Windex.matchesSelector(node, selector); + }); +}; + Windex.url = { setUrl: function (url) { return new WindexUrl(url); } }; var WindexUrl = function (url) {