| free hosting image hosting hosting reseller online album e-shop famous people | ||
![]() ![]() |
||
So if you have 5 menu items, all you need are 5 graphics, one per item.normal
mouseover
on Click
The alpha filter reduces the image's brightness, while the invert filter changes the image's colour values.alpha for the normal image
no filter for the mouseover image
invert for the clicked image
function over(elmnt)If so, the invert filter will continue to be applied.
{
if (elmnt.style.filter != "invert()")
{
elmnt.style.filter=false
}
else elmnt.style.filter="invert()"
}
function out(elmnt)If the image has been clicked on, the invert filter will still be applied on mouseout.
{
if (elmnt.style.filter!="invert()")
{
elmnt.style.filter="alpha(opacity=50)"
}
else elmnt.style.filter="invert()"
}
function clicked(elmnt)Since all images have the name pic, they form an array, pic[i].
{
i=0
for (i=0; i<3; i++)
{
pic[i].style.filter="alpha(opacity=50)"
}
elmnt.style.filter="invert()" }