SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Madison, WI
    34 Post(s)
    2 Thread(s)

    fade image with javascript.

    I am trying to code a simple slider with a fade effect using .js but I am stuck;
    I just cant figure out where the error in my logic is:

    I have an array ( the list of images) and another array which I am using to cache image objects.
    the slider() function checks for and skips missing images, adds a new image to the container and calls the fade() function.
    fade() gets an image node list of the target container. the count of which should be 2: the previous image and the one that slider() added.
    fade() then decreases the opacity of the first image until it reaches 0, then it removes that image completely, waits for a set interval and calls fader() for the next image in the cache array, so the loop continues.

    any insight would be appreciated

    code here:
    Last edited by dresden_phoenix; Feb 22, 2013 at 21:18.


Posting Permissions

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