-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
 
Yes, by adding/removing class names you effect the rendering of the
element on screen.  In fact, this is probably what I use such
functions for 95% of the time.  It's especially handy if you know you
want to toggle between styles based on user input without reloading
the page.  For example, you can create different classes for the body
tag which control font sizing, for example, and let people click
buttons on screen to change the font-size.  Then, use add/remove class
names to actually apply the font sizing on the fly.

As for your second question:  does the order of class names matter
with respect to the rendering of the object, I'm honestly not sure so
I'll leave that to someone else.

 - Dash -

Hergio wrote:
> I have a question about prototype's addClassName, removeClassName, and
> toggleClassName.  As expected, these functions add or remove a class
> name from an element.   When adding, the class names are appended to
> the end of the class list of the element.  Could this affect the
> rendering of the element?  Does the order of css class names in the
> element's class attribute matter?
>
>
> >
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFGKNmm6r+BYsa3/iMRCJw/AJsGcEMLiA8BYJwvGdQMvqXitdTurgCcD7Rd
KIhc1RwdMh/7Izupa8Rmi30=
=3TBs
-----END PGP SIGNATURE-----


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to