[jQuery] Storing Element State: ELM.$flag = true VS $(ELM).addClass('flag')

[jQuery] Storing Element State: ELM.$flag = true VS $(ELM).addClass('flag')

<div>What are people's thoughts about storing "state" by using ELEMENT.$flag as opposed to a CSS class such as "my_class_flag"?</div>
<div> </div>
<div>I always lean towards being a "DOM purest" but I think performance wise adding a boolean attribute to a DOM element is less expensive/cleaner than adding/remove/testing for a CSS class. (This attribute is only utilized from within the plugin I'm writing)
</div>
<div> </div>
<div>-js</div>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/