[thelist] changing class style with JS
Ken Kogler
ken.kogler at curf.edu
Fri Oct 25 17:07:01 CDT 2002
Here's what I've done for nav rollovers before:
The CSS:
td { background: #ffffff; }
td.on { background: #cccccc; }
The Javascript:
function swapClass(bName,bClass) {
bName.className = bClass
}
The HTML:
<td onMouseOver="swapClass(this,'on');"
onMouseOut="swapClass(this,'');">
HTH!
--Ken
> Is there a way to change elements of a CSS class using Javascript?
More information about the thelist
mailing list