Topic awaiting preservation: switch css classes using js (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 03-28-2005 13:20 |
Bipolar (III) Inmate From: Missoula, MT |
posted 03-28-2005 14:17
code: <div class="c1" onmouseover="this.style.className='c2';"> |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 03-28-2005 14:47 |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 03-28-2005 15:10 |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 03-28-2005 15:42
thanks slime. |
Bipolar (III) Inmate From: Florida |
posted 03-28-2005 17:24
...:hover? |
Maniac (V) Inmate From: under the bed |
posted 03-28-2005 17:47 |
Maniac (V) Mad Scientist From: New California |
posted 03-28-2005 18:41
I think so, DL. I think going with onmouseover and onmouseout is probably the safest for now. |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 03-28-2005 21:55 |
Nervous Wreck (II) Inmate From: Sweden |
posted 03-29-2005 07:13
Hehe, this reminded me of when I tried to change the style of hundreds of div tags at the same time. |
Bipolar (III) Inmate From: Florida |
posted 03-29-2005 14:45
quote:
|
Maniac (V) Mad Scientist From: New California |
posted 03-29-2005 17:08
But throwing in javascript defeats the benefit of an all css solution. |
Paranoid (IV) Inmate From: Florida |
posted 03-29-2005 19:05
Well they're already relying on JavaScript - IMO using JavaScript to 'fix' Internet Explorer while leaving well-developed browsers that support :hover on all elements to use "all css" is better than messing up what would if not for IE (and a desire to have compatibility for it) be perfect code. |