SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    orange pips! orange pips!
    Join Date
    Oct 2001
    Location
    Its all about location
    Posts
    652
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fading and replacing images

    I am using a fading script gotten from www.thedesigncore.com that simply uses successive changes to alpha opacities of images to "fade" them away.

    Now, using this script, I am trying to get tricky. I want to have an image appear on a page at 100% opacity. Then, when moused over, it will slowly fade away to about 10% opacity. Then, while your mouse is still over the image, the image will switch to another image that starts at 10% opacity and then slowly appears up to 100% opacity.

    Now, I have the code to do this in the fading script, however, something seems to be a little off. The original image appears on the webpage. When I mouse over it, instead of it being the slow opacity change, there is a quick blip then the faded new image comes in, another quick blip, then the new image is displayed at 100% opacity. The scripting to be doing the fading seems to be sped up or overlooked for some reason. If I try to do this without switching the images, I get the exact fading I want. As soon as I switch out the images, it turns into this quick blip'ing fades. What am I missing?

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you okay with an IE-only solution?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •