Prototype and script.aculo.us have the following convention for id
attributes and CSS classnames:
'id' attributes: all lowercase, split with '_' (example: list_item_1)
CSS classes: all lowercase, split with '-' (example: error-message)
Of course you can use other stuff, but any default settings, where
applicable, are adjusted to best work with this scheme. This also
plays part with lots of stuff in the upcoming Rails 1.2 release.
Best,
Thomas
Am 15.11.2006 um 08:51 schrieb Christophe Porteneuve:
>
> JRigby a écrit :
>> After upgrading to Scriptaculous 1.6.5 I'm having a problem with my
>> code. For reasons I won't get into here, I need to store the class
>> name
>> of an element as <<type>>|<<id>>, for example "Technology|999". I use
>> the pipe to split the class name.
>
> Aside from valid replies by my peers, I should mention that class
> names
> are not, syntactically, allowed the '|' character. Class names follow
> Lex {ident} syntax, which mostly boils down to regular identifier
> syntax. If you just need a splitter, use anything else allowed, for
> instance '_', which is just as well.
>
> This way, you shouldn't run into any trouble to start with. Replacing
> the code of hasClassName sounds like a very short-term solution, as it
> will get crushed by any code update from the repository.
>
> --
> Christophe Porteneuve a.k.a. TDD
> "[They] did not know it was impossible, so they did it." --Mark Twain
> Email: [EMAIL PROTECTED]
>
> >
--
Thomas Fuchs
wollzelle
http://www.wollzelle.com
questentier on AIM
madrobby on irc.freenode.net
http://www.fluxiom.com :: online digital asset management
http://script.aculo.us :: Web 2.0 JavaScript
http://mir.aculo.us :: Where no web developer has gone before
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---