While browsing through some HTML code, I noticed the use of classes without any CSS styling attached to them. Instead of using id's, they were simply used to group or identify elements for jQuery selectors:
html:
<div class=someClass>
</div>
<div class=someClass>
</div>
<div class=anotherClass>
</div>
CSS:
(no styles applied)
javascript:
$(".someClass").each( ... )
This approach makes sense because HTML elements can only have one unique id. However, it does feel like a bit of a workaround to use classes solely for identification rather than styling purposes. Is this a common practice, or are there better alternatives available?