Havocado a écrit :
> have to specify as a function parameter. Is there a way to get all the
> style using Prototype or Scriptaculous?
Since what you require constitutes, technically, the whole computed
style for the element, and because this feature only exists within DOM
Level 2 CSS (and later), using the AbstractView interface defined in DOM
Level 2 Views, there's no reason to provide a wrapper. Use:
document.defaultView.getComputedStyle(element, null)
This will return a CSSStyleDeclaration implementation, which you can use
as a sort of hash object and/or list for all computed CSS properties.
It must be widespread enough, as getStyle relies on it when it finds no
inline style. Read the spec [1] for more details.
[1] http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-OverrideAndComputed
--
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---