[jQuery] Re: Major Problem With Dom Traversal

2007-11-09 Thread Flesler
Yes, but if he uses .eq(0), he will be forced to use append, and if the rule addition is done many times, he would be bloating the css with duplicates. Dunno if that's such a problem, maybe .eq(0) works well. Though.. doesn't IE give more priority to the first rule and others to the last ? that co

[jQuery] Re: Major Problem With Dom Traversal

2007-11-08 Thread Guy Fraser
Could you not just use .eq(0) to get the first style node and append to that? Flesler wrote: > And that worked? if you have more than one style node, you would be > appending that to more than one, causing some overhead. > You could try this: > > var $style = $('#my_style'); > > if( $style.lengt

[jQuery] Re: Major Problem With Dom Traversal

2007-11-08 Thread Flesler
And that worked? if you have more than one style node, you would be appending that to more than one, causing some overhead. You could try this: var $style = $('#my_style'); if( $style.length == 0 ) $style = $('

[jQuery] Re: Major Problem With Dom Traversal

2007-11-07 Thread fambizzari
Flesler, that's what we ended up doing... $("head style").append(".siteWidth{width: " + modifiedW +"}"); But it still took the same amount of time for the page to update. I wonder why?

[jQuery] Re: Major Problem With Dom Traversal

2007-11-07 Thread Flesler
you should use css, if you have only two or 3 states of width, you could use CSS classes. Else you can have a style tag and append rules to it. On Nov 6, 8:20 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Working on a page with a table of about 10,000 rows and 30 div's, the > following ta

[jQuery] Re: Major Problem With Dom Traversal

2007-11-06 Thread Suni
It is very likely that the selection can be optimized a lot, but we'd need to see the structure of the HTML better to give advice...