Jump to content

[SOLVED] Image Rollover returns undefined image


aleX_hill

Recommended Posts

I am wracking my brains trying to figure out how to fix this problem, so I hope someone out there has seen it before, or can help me fix it.

 

Basically I have a rollover menu which when rolled over, the image itself changes, and changes another image as well. This can be seen on my site at www.hcdesigns.com.au

 

The problem, however, is that when you rollover one of the menu items before they all load, the image does not load (the image properties are pointing at hcdesigns.com.au/undefined . If the page has finished loading, everything works fine.

 

Another small problem is with the portfolio section, When the page loads, it should set the opacity of each div to 40%. This doesnt happen though, unless it is the second time you view the page (well load that part using AJAX). The images are all preloaded though, so I dont know how to get around this.

 

Any help is greatly appreciated.

 

Alex

I solved the problem... The js grabbed the current image in the header. and set it to a global var. This was then used in the revertImage function. The var wasnt getting the src though because the rollover was called before the source was displayed.

 

Thanks for the help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.