![]() Topic awaiting preservation: switch css classes using js (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |
Bipolar (III) Inmate From: Missoula, MT |
![]() code: <div class="c1" onmouseover="this.style.className='c2';"> |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() thanks slime. |
Bipolar (III) Inmate From: Florida |
![]() ...:hover? |
Maniac (V) Inmate From: under the bed |
![]() |
Maniac (V) Mad Scientist From: New California |
![]() 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 |
![]() |
Nervous Wreck (II) Inmate From: Sweden |
![]() 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 |
![]() quote:
|
Maniac (V) Mad Scientist From: New California |
![]() But throwing in javascript defeats the benefit of an all css solution. |
Paranoid (IV) Inmate From: Florida |
![]() 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. |