i dont use classes for determining what i should do, i use to style and to
mark groups so i can use a class selector to get them.
I think you should use the storage.
But thats my own opinion of course, wait for other people opinion.

Fábio Miranda Costa
Engenheiro de Computação
http://meiocodigo.com


On Wed, Jul 1, 2009 at 6:45 PM, Rolf -nl <[email protected]> wrote:

>
> Let's say I want to check an element's value to determine the action
> that should take place.
> I could do that with if(el.hasClass('myClass') ...
> Or I could store a state with el.store and for picking the right
> action if(el.retrieve('property') == 'whatever') ...
>
> I used the work with classes in the past, but now tend to use element
> storage (looks more like a true scripting approach), and I think it's
> faster (but that is based on nothing really).
>
> What do you use?

Reply via email to