* Please note: the expression cannot use a reference to the
* element name. See the two examples below.
*
- * This will not work: $(".res img").not("img[@src$=on]")
- *
- * This will: $(".res img").not("[@src$=on]"); // also could be written $(".res img:not([@src$=on])")
- *
* @example $("p").not( $("div p.selected") )
* @before <div><p>Hello</p><p class="selected">Hello Again</p></div>
* @result [ <p>Hello</p> ]
// is the only cross-browser way to do this. --John
isFunction: function( fn ) {
return !!fn && typeof fn != "string" && !fn.nodeName &&
- typeof fn[0] == "undefined" && /function/i.test( fn + "" );
+ fn.constructor != Array && /function/i.test( fn + "" );
},
// check if an element is in a XML document
[0,"",""];
// Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + s + wrap[2];
+ div.innerHTML = wrap[1] + arg + wrap[2];
// Move to the right depth
while ( wrap[0]-- )
}
- arg = div.childNodes;
+ arg = jQuery.makeArray( div.childNodes );
}
if ( arg.length === 0 && !jQuery.nodeName(arg, "form") )