-
- setAuto: function(e,p) {
- if ( e.notAuto ) return;
-
- if ( p == "height" && e.scrollHeight != parseInt(jQuery.curCSS(e,p)) ) return;
- if ( p == "width" && e.scrollWidth != parseInt(jQuery.curCSS(e,p)) ) return;
-
- // Remember the original height
- var a = e.style[p];
-
- // Figure out the size of the height right now
- var o = jQuery.curCSS(e,p,1);
-
- if ( p == "height" && e.scrollHeight != o ||
- p == "width" && e.scrollWidth != o ) return;
-
- // Set the height to auto
- e.style[p] = e.currentStyle ? "" : "auto";
-
- // See what the size of "auto" is
- var n = jQuery.curCSS(e,p,1);
-
- // Revert back to the original size
- if ( o != n && n != "auto" ) {
- e.style[p] = a;
- e.notAuto = true;
- }
- },