CSS button stay down
CSS button stay down
- Started
- Last post
- 5 Responses
- quamb
Have an array of links/buttons, that load a jpg into a div, and want them to stay down when clicked -- just so a user knows which images have been viewed.
A a:visited state would work if going to a new page - but these links are only loading new jpgs, so a:visited doesn't work... if that makes any sense.
Is there a way to do this? Am sucky at js and google isn't helping.
- rosem0
search: jquery click addClass
basically you'll make a "clicked" class and add that class to the clicked element. a refresh would dump it all though.
- quamb0
perfect - thanks alot
- acescence0
document.getElementById( "myid" ).setAttribute(" class", "classname" );
- same thing without using a whole libraryacescence
- yepflashbender
- IE debugging? or does it just work everywhere?vaxorcist
- quamb0
document.getElementById(id).setA... "classname" );
thanks guys --- the above worked a treat.