X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=3a759d55b56cfb5a9ed0139082bdeffdfc2aee11;hb=b36fe4686c76dc13ba64fd62e38387c7ed73e0c9;hp=c90f58d804fac67b617d0c560bb9f761c385cf6b;hpb=2f2602ed15b4bac1274d210348d63931a6fdf39e;p=jquery.git diff --git a/src/core.js b/src/core.js index c90f58d..3a759d5 100644 --- a/src/core.js +++ b/src/core.js @@ -266,7 +266,7 @@ jQuery.fn = jQuery.prototype = { return jQuery.find( selector, elem ); }); - return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? + return this.pushStack( /[^+>] [^+>]/.test( selector ) ? jQuery.unique( elems ) : elems ); }, @@ -441,7 +441,7 @@ jQuery.fn = jQuery.prototype = { }, eq: function( i ) { - return this.slice( i, i + 1 ); + return this.slice( i, +i + 1 ); }, slice: function() { @@ -943,12 +943,12 @@ jQuery.extend({ context = context.ownerDocument || context[0] && context[0].ownerDocument || document; jQuery.each(elems, function(i, elem){ + if ( typeof elem == 'number' ) + elem += ''; + if ( !elem ) return; - if ( elem.constructor == Number ) - elem += ''; - // Convert html string into DOM nodes if ( typeof elem == "string" ) { // Fix "XHTML"-style tags in all browsers @@ -1368,4 +1368,4 @@ jQuery.each([ "Height", "Width" ], function(i, name){ // Helper function used by the dimensions and offset modules function num(elem, prop) { return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; -} \ No newline at end of file +}