Is there a simple way to change the id of a div by clicking on a link?
Here is what I am going for:
Link1 gives div id=1
Link2 gives div id=2
Link3 gives div id=3
I am trying to make both an image and text change by clicking on the appropriate link.
I figured I could change the id of div with the image and use a sprite to get the right part of the image to show up
I would also like the text in the second div to change
Thank you :)
In your example, it is when you click the text that the links get the new class and change color.
I will try to work with it so that when you click the links the text changes color ie gets the right class according to the link that was clicked.
Thank you for sharing the code with me and all your help.
On this way you can select a color multiple times and you can easily re-use this piece of code. On this way the only thing you need to do is add some new css classes to your stylesheet and make sure everything has the right id ;)!