I have such a div:. How can I highlight every other list element in the div without the use of jQuery?
The easiest way to perform this is with a CSS, for a compatible browser. Example:
li: nth-child (even) {background: #CCC} li: nth-child (strange) {background: #FFF}
Comments
Post a Comment