On Oct 17, 2011, at 9:40 PM, joe t. wrote:
> i don't think Prototype has a method for directly editing a STYLE tag
> (only for modifying styles on element[s].
>
> But
> http://stackoverflow.com/questions/524696/how-to-create-a-style-tag-with-javascript
> seems to offer a couple cross-browser approaches by examining feature
> support to determine which way to append style rules to the interior
> of a STYLE tag.
>
> i haven't tested, but as they say, seems legit.
> -joe t.
>
>
> On Oct 17, 11:55 am, Luke <[email protected]> wrote:
>> Hi there,
>>
>> I wanna add CSS-Definitions to a <style>-tag using Prototype. In all "good"
>> browsers (ALL^IE) this works by simplay appending a CSS-String to the
>> desired <style>-tag. IE doesn't like this though. I found [1] that in IE you
>> can update the entire contents of the style-tag using an attribute named *
>> cssText* but that doesn't append but replace the all definitions.
>>
>> So I was wondering, does Prototype JS already have a method to append
>> style-definitions to a styletags for all browsers?
>>
>> Thanks,
>> Lukas
>>
>> [1]http://acidmartin.wordpress.com/2009/05/06/creating-style-tag-with-ja...
I find that with a tiny bit of planning, you can do these sorts of global
changes by setting up class-based styles beforehand, and then using
invoke('addClassName','foo') to add the appearance to any number of elements in
one whack.
Walter
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en.