View Full Version : Resolved How to not fade in (just) the first image

08-23-2010, 06:45 PM
1) Script Title: Ultimate Fade-in slideshow (v2.4)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.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.

08-23-2010, 09:55 PM
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.

Updated attachment

08-23-2010, 10:23 PM
Thanks! I'll give it a try tomorrow.

08-24-2010, 04:16 PM
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:
(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.

08-25-2010, 04:16 PM
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.

08-25-2010, 06:30 PM
It's working now in all of the tested browsers.