X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Fjquery.js;h=5e0fa0e7a2fb36db63fe45d30c241a4ce88db255;hp=b03c3fbfe75ba8c09de2a2c5e450ae1ce88661f8;hb=bbd4c681081a1ce88c71b99d7f66032594a28948;hpb=327c3bd99f586f3cf3af55f9adb10a71eb78cdd4 diff --git a/js/jquery.js b/js/jquery.js index b03c3fb..5e0fa0e 100755 --- a/js/jquery.js +++ b/js/jquery.js @@ -1,13 +1,13 @@ (function(){ /* - * jQuery 1.2.3 - New Wave Javascript + * jQuery 1.2.4 - New Wave Javascript * * Copyright (c) 2008 John Resig (jquery.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * - * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $ - * $Rev: 4663 $ + * $Date: 2008-05-18 23:05:38 -0400 (Sun, 18 May 2008) $ + * $Rev: 5631 $ */ // Map over jQuery in case of overwrite @@ -101,7 +101,7 @@ jQuery.fn = jQuery.prototype = { }, // The current version of jQuery being used - jquery: "1.2.3", + jquery: "1.2.4", // The number of elements contained in the matched element set size: function() { @@ -596,7 +596,7 @@ jQuery.extend = jQuery.fn.extend = function() { // Recurse if we're merging object values if ( deep && options[ name ] && typeof options[ name ] == "object" && target[ name ] && !options[ name ].nodeType ) - target[ name ] = jQuery.extend( target[ name ], options[ name ] ); + target[ name ] = jQuery.extend( deep, target[ name ], options[ name ] ); // Don't bring in undefined values else if ( options[ name ] != undefined ) @@ -1122,7 +1122,7 @@ jQuery.extend({ var ret = []; // Need to use typeof to fight Safari childNodes crashes - if ( typeof array != "array" ) + if ( array.constructor != Array ) for ( var i = 0, length = array.length; i < length; i++ ) ret.push( array[ i ] ); else @@ -2677,7 +2677,7 @@ jQuery.extend({ jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); // Set header so the called script knows that it's an XMLHttpRequest - //xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + // xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); // Set the Accepts header for the server, depending on the dataType xml.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? @@ -3405,4 +3405,32 @@ jQuery.fn.offset = function() { return results; }; -})(); + +// Create innerHeight, innerWidth, outerHeight and outerWidth methods +jQuery.each(["Height", "Width"], function(i, name){ + + var tl = name == "Height" ? "Top" : "Left", // top or left + br = name == "Height" ? "Bottom" : "Right"; // bottom or right + + // innerHeight and innerWidth + jQuery.fn["inner" + name] = function(){ + return this[ name.toLowerCase() ]() + + num(this, "padding" + tl) + + num(this, "padding" + br); + }; + + // outerHeight and outerWidth + jQuery.fn["outer" + name] = function(margin) { + return this["inner" + name]() + + num(this, "border" + tl + "Width") + + num(this, "border" + br + "Width") + + (!!margin ? + num(this, "margin" + tl) + num(this, "margin" + br) : 0); + }; + +}); + +function num(elem, prop) { + elem = elem.jquery ? elem[0] : elem; + return elem && parseInt( jQuery.curCSS(elem, prop, true) ) || 0; +}})();