X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjquery%2Fjquery.js;h=70a16e680a34aef156d768d221e9505d1db23d5b;hb=bfa79591b3c849d8df6cd8c7eac757732a855519;hp=71485b0831bc79ac16d7068d05b5ba1158c69a04;hpb=bb3520432673f18c3e461cb319e4be6bf547f23d;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 71485b0..70a16e6 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -548,7 +548,7 @@ jQuery.fn = jQuery.prototype = { "textContent" : "innerText"; return e == undefined ? - this.length && this[0][ type ] : + jQuery.map(this, function(a){ return a[ type ]; }).join('') : this.each(function(){ this[ type ] = e; }); }, @@ -925,7 +925,7 @@ jQuery.fn = jQuery.prototype = { jQuery.grep(this,function(a){ if ( t.constructor == Array || t.jquery ) - return !jQuery.inArray( t, a ); + return jQuery.inArray( t, a ) < 0; else return a != t; }) ); @@ -1254,7 +1254,7 @@ jQuery.extend({ prop: function(elem, value, type){ // Handle executable functions if ( value.constructor == Function ) - return value.call( elem ) + return value.call( elem ); // Handle passing in a number to a CSS property if ( value.constructor == Number && type == "css" ) @@ -1383,9 +1383,14 @@ jQuery.extend({ clean: function(a) { var r = []; - + for ( var i = 0, al = a.length; i < al; i++ ) { var arg = a[i]; + + if ( !arg ) continue; + + if ( arg.constructor == Number ) + arg = arg.toString(); // Convert html string into DOM nodes if ( typeof arg == "string" ) { @@ -1436,7 +1441,7 @@ jQuery.extend({ arg = div.childNodes; } - if ( arg.nodeType ) + if ( arg[0] == undefined ) r.push( arg ); else r = jQuery.merge( r, arg );