Thanks Brandon! For the lazy, get the latest version here: http://jquery.com/dev/svn/trunk/plugins/dimensions/dimensions.js?format=raw Or all the files related to the plugin here: http://jquery.com/dev/svn/trunk/plugins/dimensions/
--Erik On 1/7/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: > I just finished checking in some major updates to the dimensions plugin. > > * Added unit tests > * Fixed a bug in .innerHeight() and .innerWidth() > * Major refactor of .offset() method to be faster and fix a couple of bugs > * Added a test/example/benchmark page for the .offset() method > > All of this can be found in SVN but you can try the unit tests for > yourself here: > http://brandon.jquery.com/plugins/dimensions/test/unit.html > http://brandon.jquery.com/plugins/dimensions/test/offset.html > > The .offset() method has changed a lot in the name of performance. > First it takes an optional param called, includeScrollOffsets. By > default this param is true and will calculate the scroll offsets. The > returned object will have two extra properties called scrollTop and > scrollLeft. These two properties are the cumulative scroll offset. If > the includeScrollOffsets param is set to false, then the scroll offset > calculation is ignored and that should provide a performance boost. > > Even with the changes made getting the offset of an element is a slow > process. So try and cache the offset value when you can instead of > calling it lots of times in succession. > > There is a bug in Firefox with the .scrollWidth property where it only > returns width of the visible area, hence the one failure in Firefox. I > could use some help with this nasty little bug. :) > > If you find any bugs or have a feature request feel free to log them > and set the component to dimensions. http://jquery.com/dev/bugs/new/ > > -- > Brandon Aaron > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/