letsgetsilly
Senior member
Hey everyone,
I'm trying to get a webpage menu in the header to work with javascript where the following happens:
onmouseover: the image temporarily changes
onselected: the image changes until the next menu click occurs.
And when another menu link is selected, the image returns to its default image.
This means that there is a total of 3 images per menu item that I need going. I have 5 menu items i'd like to do this for, plus 4 side-menu items on each page. I've gotten this to work using the Adobe ImageReady generated javascript code, but it is very ugly code and I don't know whether this is the best way to do it or not. I'll post the code below if you'd like to look through it..it isn't pretty.
Any suggestions on a simple way to do this without building extensive arrays that include every image I have would be very helpful. Thanks for the advice.
I'm trying to get a webpage menu in the header to work with javascript where the following happens:
onmouseover: the image temporarily changes
onselected: the image changes until the next menu click occurs.
And when another menu link is selected, the image returns to its default image.
This means that there is a total of 3 images per menu item that I need going. I have 5 menu items i'd like to do this for, plus 4 side-menu items on each page. I've gotten this to work using the Adobe ImageReady generated javascript code, but it is very ugly code and I don't know whether this is the best way to do it or not. I'll post the code below if you'd like to look through it..it isn't pretty.
Any suggestions on a simple way to do this without building extensive arrays that include every image I have would be very helpful. Thanks for the advice.