Classnames for styling, data-attributes for behaviour:

For a while I’ve been using a rule-of-thumb that I’d like to share with you. Basically, when attaching behavior to html elements, in the form of event handlers and such, I use data-attributes to identify elements rather than classnames.

Gute und sinnvolle Beobachtung.