After further tests I realize that most of the time is spent in getting the height and width of the passed element:
oHeight = e.offsetHeight;
oWidth = e.offsetWidth;
oWidth = e.offsetWidth;
Since this calculated by the browser I don't think there's much to do. What do you think? I'm using IE 6; I don't know if the same delay is present in other browsers (probably it is). Do you know of a more efficient way to get the width/height of an element; otherwise I can only think on doing some caching of these values.
Thanks
On 10/17/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
Would it be possible for you to post a link so that we can see it or
at least maybe just a test case?
--
Brandon Aaron
On 10/17/06, Raziel Alvarez <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm performing css manipulation in my application, but the performance
> degrades considerably fast as more markup is added. I tracked the problem to
> the jQuery.css function, specifically for those cases where I'm setting the
> width and height. Even small additions to the markup inside of the container
> to which I want to set the width and height produce a big increase in the
> delay of such function.
>
> I took a quick look at the implementation and they seem to be special cases,
> and since I don't quite get the logic inside I don't feel comfortable
> changing it.
>
> My application is getting to the point of being useless because of the
> delay. Is there a plan to fix this in the next release? Is there any way
> this can be improved meanwhile?
>
> Regards,
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
