Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouseover on background that changes depending on time of day

Status
Not open for further replies.

PennyB

Technical User
Jul 4, 2002
252
GB
I found a javascript that changes the background colour of a webpage, depending on the time of day. Works fine.

Then I had a brainwave of using a mouseover on my links so that it looks like an arrow moves up and down the links as the mouse moves. that would also work, I'm guessing.

However...I'm not sure the two would work together, because of the changing background.

Has anyone got an idea of how I can get the two to work together?

Thanks in advance

Penny :)
 
Penny,

There is no reason why you cannot have the two effects working at the same time. One is going to be handled in the onload event handler of the body (setting the background colour), and one will be handled in the onmouseover event handler of the links. There should be no conflict.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hi Dan :)

Yes.....but if one image is coloured the same as the background (so it seems like the arrow moves as you move the mouse), I need the one image to change colour too, or the page will look odd.

ie, having a red arrow on a white background - I'd need to do a gif of a white square. So when the background changes at say 6pm, to yellow, the white square would stand out.

I was wondering if there was a way to get the javascript to 'know' which colour the empty square should be.... I am a javascript newbie.

Penny :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top