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 could cause different behaviors on each browser... In conclusion, fambizzari, do as you wish, you should try all this options and see what works better...
Ariel Flesler On 8 nov, 18:50, Guy Fraser <[EMAIL PROTECTED]> wrote: > 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.length == 0 ) > > $style = $('<style>').attr('type','text/ > > css').attr('id','my_style').appendTo('head'); > > > $style.text(".siteWidth{width: " + modifiedW +"}");//add 'px' if > > modifiedW lacks it- Ocultar texto de la cita - > > - Mostrar texto de la cita -