Fixed issue with .remove() not working correctly.
[jquery.git] / src / jquery / jquery.js
index ef55567..e26ae9e 100644 (file)
@@ -69,7 +69,7 @@ function jQuery(a,c) {
 }
 
 // Map over the $ in case of overwrite
-if ( $ )
+if ( typeof $ != "undefined" )
        jQuery._$ = $;
 
 // Map the jQuery namespace to the '$' one
@@ -637,6 +637,7 @@ jQuery.fn = jQuery.prototype = {
         * @example $("p").not("#selected")
         * @before <p>Hello</p><p id="selected">Hello Again</p>
         * @result [ <p>Hello</p> ]
+        * @test cmpOK($("#main > p#ap > a").not("#google").length, "==", 2, ".not")
         *
         * @name not
         * @type jQuery
@@ -2382,7 +2383,7 @@ jQuery.macros = {
                 * @param String expr An expression to filter the child Elements with
                 * @cat DOM/Traversing
                 */
-               children: "a.childNodes"
+               children: "jQuery.sibling(a.firstChild)"
        },
 
        each: {
@@ -2548,7 +2549,7 @@ jQuery.macros = {
                 * @cat DOM/Manipulation
                 */
                remove: function(a){
-                       if ( !a || jQuery.filter( [this], a ).r )
+                       if ( !a || jQuery.filter( a, [this] ).r )
                                this.parentNode.removeChild( this );
                },