I would like the color of the list marker to alternate each time it is clicked. It starts off grey, then I want it turn blue on the next click and then back to grey and so on. However, I'm not sure how to do this in JavaScript - can anyone help? This is what I have so far:
CSS
HTML
Thanks in Advance
CSS
Code:
li.grey {list-style-type: square; color: grey;}
Code:
<li id="CornflowerBlue" class="grey" onClick="this.style.color=this.id;"><a href="#">Link1</a></li>