How to add a class to a element depending on the anchor of the page ?
Ohai,
I would like, depending on the value of the anchor called, to add a class to the box related.
Actually, i have :
- <div id="a1111">text</div>
- <div id="a2222">text</div>
- <div id="a3333">text</div>
And i would like that when the page is called like in the previous example, the "highlight" class is added to the box with the id "a1111":
- <div id="a1111" class="highlight">text</div>
- <div id="a2222">text</div>
- <div id="a3333">text</div>
Would you have any idea on how to do so ?
(the link is external to the page)
Thanks