The basic rule is to use CSS wrt jQuery: use classes. and then use more classes. but make sure classes represent a "role" and not a "behavior"
for example: this is bad
<ul> <li class='red'><a href='http://microsoft.com/'>MS</a></li> <li><a href='http://google.com/'>goog</a></li> <li class='green-bg'><a href=http://ubuntu.com/'>Ubuntu</a></li> </ul>
for example: this is good.
<ul> <li class='bad-link'><a href='http://microsoft.com/'>MS</a></li> <li><a href='http://google.com/'>goog</a></li> <li class='current-link'><a href=http://ubuntu.com/'>Ubuntu</a></li> </ul>
This subtle CSS convention allows you to do powerful things in the user interface with real ease.
Cheers, jrh.
source share