On Fri, 2009-02-13 at 17:10 -0500, John Resig wrote:
> > I think this is important to have: when calling .height()/.width()
> > we have to show the element to measuring it, and this makes it
> > twice as slow to get both the height/width. On large elements
> > this can bring the time down to 500ms from 1s. Big improvement.
>
> Umm - unless I'm missing something that hasn't changed - in $.size
> there are the following lines:
>
> 59 if ( $.curCSS( elem, "display" )!='none' ) getSize();
> 60 // swap element layout, then calculate value
> 61 else $.swap( elem, {
> 62 position: "absolute", visibility: "hidden",
> display: "block"
> 63 }, getSize );
No, I just didn't read the code right, I just based it on the name.
So, I think we should have a .size() or .dim() function to
return both the width()/height() at the same time to work
around the above problem.
--
Dimi Paun <[email protected]>
Zipalong, Inc.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---