Results 1 to 6 of 6

Thread: How to not fade in (just) the first image

  1. #1
    Join Date
    Aug 2010
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question How to not fade in (just) the first image

    1) Script Title: Ultimate Fade-in slideshow (v2.4)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem:

    First off, thank you to the developers for making this script available, I appreciate it.

    I'm attempting to use the Ultimate Fade-in slideshow in a page header. I'm not using frames for it, though, so the script is reloaded each time that a user clicks a link on the site. Is there a way to prevent the first fade-in (i.e. make the first image just appear without fading in), and then proceed normally with the fades for subsequent images (after the programmed delay [10 seconds in my case] has passed)? Having the first image fade in can get annoying if a user is quickly clicking through pages on the site.
    Last edited by AndrewM; 08-25-2010 at 06:30 PM. Reason: Issue resolved.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Sure, try the below modified .js file, which should cause the 1st image to be slided in to appear immediately, instead of the usual fade in.

    Edit: Updated attachment
    Last edited by ddadmin; 08-25-2010 at 04:16 PM.
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    AndrewM (08-25-2010)

  4. #3
    Join Date
    Aug 2010
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks! I'll give it a try tomorrow.

  5. #4
    Join Date
    Aug 2010
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    It's working in Firefox, but not in any of the other browsers that I tested (IE, Opera, Chrome, Safari).

    It appears to be not properly processing the:
    Code:
    (typeof duration!="undefined")? duration : setting.fadeduration
    (line 146) in those browsers, so the setting.fadeduration is always used instead of the 0 that's in duration for the first image. I don't do a lot of work with JavaScript, so I'm not sure how/if it's possible to fix that. I tried a few things like trying to check for the 0 value, but nothing that I tried worked.

  6. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ah yes the 0 value needs to be passed into the same function elsewhere in the code as well in order for it to work across browsers. I've updated the attached .js file for this.
    DD Admin

  7. The Following User Says Thank You to ddadmin For This Useful Post:

    AndrewM (08-25-2010)

  8. #6
    Join Date
    Aug 2010
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    It's working now in all of the tested browsers.

    Thanks!

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
  •