If you mean another additional method, I could see some merit in that. If you mean to calculate both the height and width every time you call height or width, I think that would do more negative impact than good.
On Feb 13, 5:20 pm, Dimi Paun <d...@zipalong.com> wrote: > 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 <d...@zipalong.com> > 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 jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---