PDA

View Full Version : Change CSS Property of an entire class onClick?


LiqwidGrant
09-05-2005, 05:25 AM
Is it possible to change a CSS property of an entire class on the fly?

I am trying to create a color changing script for www.homesteadartclub.org (I know it's messy, it's just a proof right now). The problem I'm having is that I am going to need to change the color of the navigation links and it doesn't seem efficient to do it the way I am doing it...Which, is probably not very efficient at all.

Currently I have a script that changes the backgroundColor property of all the boxes / text areas (if applicable) onClick.

I don't want to have to add an additional like for each one of the navigation links, so I'd like to be able to asign a class to the links and change the color property of the class.

Any suggestions?

Thanks!
-Grant

harbingerOTV
09-05-2005, 05:55 AM
evening Grant,

your link doesn't have any navigation on it so I can't help you any. Is there a subsite you ment to link to? Unless your talking about the calendar page.

BTW your address is missing the state in it.

LiqwidGrant
09-05-2005, 08:41 AM
Yeah, that was stupid of me. http://www.homesteadartclub.org/web

I haven't set the links as a class, but when I do, I am just wondering if there is a way to dynamically change the color property...

Thanks

ronaldb66
09-05-2005, 02:57 PM
The magic words here are "style switcher". try Googling for those, or do a search on A List Apart (http://www.alistapart.com/); I'm sure they did a couple of articles on style switching.

LiqwidGrant
09-05-2005, 07:03 PM
Thanks! That's what I was looking for, those magic words. I think that will do it. :D

-Grant