X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=061d86c89e001b2ba434fa3ed28d22bae74470e2;hb=ab2d10c6d62c4d2b834337e238cf2a618eec4412;hp=cd4d4e79698fb4b64ce304a778a1363e3fc3320b;hpb=a782afdfd00f12cc6fab25c83bbaeefd0705b544;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index cd4d4e7..061d86c 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -774,30 +774,10 @@ jQuery.fn = jQuery.prototype = { * If there was no destructive operation before, an empty set is returned. * * A 'destructive' operation is any operation that changes the set of - * matched jQuery elements. These functions are: - * These functions are: - * - * add - * - * children - * - * clone - * - * filter - * - * find - * - * not - * - * next - * - * parent - * - * parents - * - * prev - * - * siblings + * matched jQuery elements. These functions are: add, + * children, clone, filter, + * find, not, next, + * parent, parents, prev and siblings. * * @example $("p").find("span").end(); * @before

Hello, how are you?

@@ -952,10 +932,6 @@ jQuery.fn = jQuery.prototype = { * 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

Hello

Hello Again

* @result [

Hello

] @@ -1279,7 +1255,7 @@ jQuery.extend({ // 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 @@ -1292,7 +1268,7 @@ jQuery.extend({ }, /** - * A generic iterator function, which can be used to seemlessly + * A generic iterator function, which can be used to seamlessly * iterate over both objects and arrays. This function is not the same * as $().each() - which is used to iterate, exclusively, over a jQuery * object. This function can be used to iterate over anything. @@ -1496,7 +1472,7 @@ jQuery.extend({ [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]-- ) @@ -1519,7 +1495,7 @@ jQuery.extend({ } - arg = div.childNodes; + arg = jQuery.makeArray( div.childNodes ); } if ( arg.length === 0 && !jQuery.nodeName(arg, "form") ) @@ -1564,11 +1540,6 @@ jQuery.extend({ return elem.filter ? parseFloat( elem.filter.match(/alpha\(opacity=(.*)\)/)[1] ) / 100 : 1; - // Mozilla doesn't play well with opacity 1 - if ( name == "opacity" && jQuery.browser.mozilla && value == 1 ) - value = 0.9999; - - // Certain attributes only work when accessed via the old DOM 0 way if ( fix[name] ) { if ( value != undefined ) elem[fix[name]] = value; @@ -1610,7 +1581,8 @@ jQuery.extend({ makeArray: function( a ) { var r = []; - if ( a.constructor != Array ) + // Need to use typeof to fight Safari childNodes crashes + if ( typeof a != "array" ) for ( var i = 0, al = a.length; i < al; i++ ) r.push( a[i] ); else @@ -2288,7 +2260,7 @@ jQuery.each( [ "eq", "lt", "gt", "contains" ], function(i,n){ */ /** - * Set the CSS width of every matched element. If no explicit unit + * Set the CSS height of every matched element. If no explicit unit * was specified (like 'em' or '%') then "px" is added to the width. * * @example $("p").height(20);