add Ox..is()

This commit is contained in:
rolux 2014-08-21 13:05:41 +02:00
parent d030b8d764
commit 64226b9a37

View file

@ -236,6 +236,12 @@ Ox.$ = Ox.element = function(value) {
return this; return this;
}, },
/*@ /*@
is <f> Returns true if the element matches the query
@*/
is: function(query) {
return Ox.contains(this.parent().querySelectorAll(query), this[0]);
},
/*@
next <f> Returns the sibling after this element next <f> Returns the sibling after this element
() -> <h> Next element () -> <h> Next element
@*/ @*/