Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- CSS: Change text color upon click
July 31, 2005, 4:53 pm
rate this thread
I have a multiple choice quiz where I would like to use CSS to change the
color of the answers upon clicking them. I would like to present the right
and wrong answers up front, rather than direct the user to a separate page
with all correct answers.
Do the answers have to be "links" for this to work? They have to be inactive
links, because they don't actually go anywhere. They only serve the purpose
of changing color whether they're right or wrong.
There are four answers per question. Every answer will change a color when
clicked. The correct answer will turn green, and the incorrect one will turn
red. By the end of the quiz, most (if not all) choices will have probably
So, I'm trying to do two things, with a CSS class, if possible:
1) Prevent the clicked text link from trying to take me anywhere
2) Change the color of the text link
How do I do this? Any pointers are appreciated! :-)
- Beauregard T. Shagnasty
July 31, 2005, 11:19 pm