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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.