Forum Moderators: open
[edited by: tedster at 1:24 pm (utc) on July 9, 2003]
(css)
.one { background: #FFF; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100)}
.two { background: #000; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50) }
(script)
function changeClass(newClassName,targetDiv) {
targetDiv.className = newClass;
} (html)
<div onmouseover="changeClass('two',this)" class="one"></div> is a straightforward way to get it to work.
There are more elegant ways of putting the event handler on the div, but I will leave that as an exercise.