John, >if ( parseFloat(jQuery.fn.jquery) <= 1.1 ) { > // it's a pixel amount >} else { > // it's a decimal amount >}
I've updated my example code to hopefully be "future" proof. ;) http://www.pengoworks.com/workshop/jquery/resig_accordion.htm Have you thought about passing in both the percentage and the pixel value? To calculate the height fix on the old panel based upon a pixel value, the equation is: Math.ceil(height - n) The equation based on a percentage is: Math.ceil(height - (height * n)) The pixel value is essentially "height * n". If that value is already been calculated by jQuery, why recalculate it? Why not change the step to so that it gets both? -Dan PS - Also, if you passed in the current "z.now" as the first argument (which is the "pixel" value,) then you could pass in percentage as the 2nd value. This would preserve backwards compatibility (although that would mean my "future" proof fix is no good. <g>)