X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=1ec8de057ffbf38fb93dd46c98e83541a8e2cc13;hb=ce4ab8a60e17ceafc3e67ddf4cc1b0526841a459;hp=7ac4ad75b85a7ef4b570dd2dcfd0443f023198ef;hpb=feb9051c0e29937c2494c3db0862a671efc21747;p=jquery.git diff --git a/src/core.js b/src/core.js index 7ac4ad7..1ec8de0 100644 --- a/src/core.js +++ b/src/core.js @@ -353,7 +353,10 @@ jQuery.fn = jQuery.prototype = { selector = jQuery.multiFilter( selector, this ); return this.filter(function() { - return jQuery.inArray( this, selector ) < 0; + // check to see if the selector is array-like otherwise assume it is just a DOM element + return ( selector.length && selector[selector.length - 1] !== undefined ) + ? jQuery.inArray( this, selector ) < 0 + : this != selector; }); }, @@ -816,6 +819,12 @@ jQuery.extend({ "1" : ret; } + // Opera sometimes will give the wrong display answer, this fixes it, see #2037 + if ( jQuery.browser.opera && name == "display" ) { + var save = elem.style.display; + elem.style.display = "block"; + elem.style.display = save; + } // Make sure we're using the right name for getting the float value if ( name.match( /float/i ) )