View Full Version : Ultimate Fade-in slideshow: change transition speed

09-08-2009, 09:11 PM
1) Script Title: Ultimate Fade-in slideshow (v1.51)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem:

This is actually not a problem, but a feature suggestion. Maybe the developers of this great script find it useful for a version to come, or it helps someone.

A client asked me for a slower transition between the images. I found that this is quite easy to achieve, when changing the degree values on lines 35, 70, and 125 of the script that goes to the head section.

Instead of hard-coding an other value, you can introduce a variable - I called it speed - and declare it in the configuring section on the top of the script:

var fadebgcolor="white";
var speed = 3;

Then you insert the variable name instead of the value of 10 as the degree value in the lines named above, such as line 35 (well, now line 36):

this.degree=speed //initial opacity degree (10%)

A lower value will result in a slower, smoother transition, a higher value in a faster one.

I am sure this could even be done at fadeshow level with a new argument in the fadeshow declaration, anyway I did not try that, as one speed value for all fadeshows on a page is okay for me.

09-09-2009, 07:24 AM
Thanks for the suggestion, though finer control of the animation speed will be built in by default with the new version of the script, which should be released in the next couple of days. :)