Help with a very simple image fader

Discussion in 'JavaScript' started by relinquish, May 25, 2008.

  1. #1
    Hello,

    I am trying to figure out the simplest way of fading between images when triggered by hovering over the respective link.

    Now, I recently discovered jQuery and tried to adapt some existing code to suit my needs, however I encountered two problems:
    1) The images don't fade correctly in internet explorer 7. Instead of a fading effect, the image seems to load choppily in sections (and returns an error).
    2) I can only fade in a certain order (i.e. link1 then link2, but not link2 then link1).

    Ideally, I'd not like to have to hardcode a bunch of divs into the page. Instead I would create divs using DOM on the fly using ajax. Although, the ultimate solution would not require having to create a div in the first place.
    You can have a look at my attempt's code at relinquish.googlepages.com/adaptation.htm. However if anyone has a simpler solution not requiring any library, which works on IE6/IE7, and does not involve the creation of new divs to work I would be much obliged.

    Any suggestions?
     
    relinquish, May 25, 2008 IP