- parent: "a.parentNode",
- parents: "jQuery.dir(a,'parentNode')",
- next: "jQuery.nth(a,2,'nextSibling')",
- prev: "jQuery.nth(a,2,'previousSibling')",
- nextAll: "jQuery.dir(a,'nextSibling')",
- prevAll: "jQuery.dir(a,'previousSibling')",
- siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
- children: "jQuery.sibling(a.firstChild)",
- contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"
-}, function(i,n){
- jQuery.fn[ i ] = function(a) {
- var ret = jQuery.map(this,n);
- if ( a && typeof a == "string" )
- ret = jQuery.multiFilter(a,ret);
- return this.pushStack( jQuery.unique(ret) );
+ parent: "elem.parentNode",
+ parents: "jQuery.dir(elem,'parentNode')",
+ next: "jQuery.nth(elem,2,'nextSibling')",
+ prev: "jQuery.nth(elem,2,'previousSibling')",
+ nextAll: "jQuery.dir(elem,'nextSibling')",
+ prevAll: "jQuery.dir(elem,'previousSibling')",
+ siblings: "jQuery.sibling(elem.parentNode.firstChild,elem)",
+ children: "jQuery.sibling(elem.firstChild)",
+ contents: "jQuery.nodeName(elem,'iframe')?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)"
+}, function(name, fn){
+ fn = eval("false||function(elem){return " + fn + "}");
+
+ jQuery.fn[ name ] = function( selector ) {
+ var ret = jQuery.map( this, fn );
+
+ if ( selector && typeof selector == "string" )
+ ret = jQuery.multiFilter( selector, ret );
+
+ return this.pushStack( jQuery.unique( ret ) );