Added two quick semicolon fixes.
[jquery.git] / src / jquery / jquery.js
index f7f3997..fdb488e 100644 (file)
@@ -280,7 +280,7 @@ jQuery.fn = jQuery.prototype = {
                        return num == undefined ?
 
                                // Return a 'clean' array
-                               jQuery.map( this, function(a){ return a } ) :
+                               jQuery.merge( this, [] ) :
 
                                // Return just the object
                                this[num];
@@ -1168,12 +1168,19 @@ jQuery.extend({
                                        oWidth = e.offsetWidth;
                                } else {
                                        e = jQuery(e.cloneNode(true)).css({
-                                               visibility: "hidden", position: "absolute", display: "block"
+                                               visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
                                        }).appendTo(e.parentNode)[0];
 
+                                       var parPos = jQuery.css(e.parentNode,"position");
+                                       if ( parPos == "" || parPos == "static" )
+                                               e.parentNode.style.position = "relative";
+
                                        oHeight = e.clientHeight;
                                        oWidth = e.clientWidth;
                                        
+                                       if ( parPos == "" || parPos == "static" )
+                                               e.parentNode.style.position = "static";
+
                                        e.parentNode.removeChild(e);
                                }
                        });
@@ -1194,7 +1201,7 @@ jQuery.extend({
 
                } else if (elem.currentStyle) {
 
-                       var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()}); 
+                       var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();}); 
                        ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
 
                } else if (document.defaultView && document.defaultView.getComputedStyle) {