This question is a bit ilke the opposite of this one: Is it poor form to use CLASS attributes with no corresponding CSS rule?
There are several places in my code where I have a list of things that I want to process using jQuery:
<div class="myitem" id="item1">...</div>
<div class="myitem" id="item2">...</div>
<div class="myitem" id="item3">...</div>
<div class="myitem" id="item4">...</div>
I process these with some javascript code, e.g.:
$(".myitem").click(function() { ... });
These items also have a css style, e.g.:
.myitem { border: 2px solid green; }
It's a big project, with dedicated personell for working with ux stuff (including hacking css and html) and programmers that are more focussed on javascript and other code.
Should I change this to use a separate class for jquery stuff, so we don't accidentally rename or remove a css class, thinking we're just working with graphical appearance? Will introducing a new class for javascript introduce more problems? Is there some code standard trickery we could put in use to help us working with this html?