In your html template or page add a nojs class to your html node and a script tag in the head section below your title changing the className to js:
In this very simple example all of your non-javascript users would see links with a class of myclass as red and all javascript enabled users would see the links with the color black. Both javascript and non-javascript users would see the links with the class myclass2 as blue.
Continue reading