I have a click function where you click on an anchor tag, it changes the background of that clicked anchor tag and the text in another element on the page. Now when you click on another anchor tag, it should change the text to the second text variable.When a-tag clicked a third time(that is the third anchor tag, I have 3 of them), it should change back to the first text variable again. Here is my example, but can’t seem to get it working. Also, the background does not change opacity as it should, but I think it is because it is in a td tag-see example
thank you!
Working demo http://jsfiddle.net/tB3pP/3/
I have just used you r code and did minor changes like
var = iandi%2Behaviour achieved: when you click 1st time its
text1second time itstext2third time itstext1again.Hope this helps, Please lemme know if I missed anything,
code