PDA

View Full Version : Fade in/out settings on Featured Content Clider



Geezer D
04-13-2008, 12:11 AM
1) Script Title:
Featured Content Slider

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

3) Describe problem:
What do I need to change in the javascript to get the fading changes, in and out, to be slower, and less harsh looking?

Thanks

terrik
04-13-2008, 12:32 AM
In the code, inserted into the body of your page, change the mileseconds parameter for each instance.



<script type="text/javascript">
//Define: ContentSlider("slider_ID", [autorotate_miliseconds], [custompaginatelinkstext], [customnextlinktext])
ContentSlider("slider1")
//OR ContentSlider("slider1", 3000)
//OR ContentSlider("slider1", 3000, linktextarray)
//OR ContentSlider("slider1", 3000, linktextarray, "Foward")
//OR ContentSlider("slider1", "", linktextarray)
//OR ContentSlider("slider1", "", "", "Foward")
</script>


1000 miliseconds is equal to 1 second.
Increase the number to make the transition last longer.
Decrease the number to make the transition quicker.

Hope this helped. :p

Geezer D
04-13-2008, 01:19 AM
That's just the change of the pictures, I want to slow down the opacity from coming up and going down so fast. Changing that doesnt affect it.

thetestingsite
04-13-2008, 01:40 AM
In this function of contentslider.js, change the highlighted part to a higher number:



ContentSlider.fadeup=function(sliderid){
var targetobject=document.getElementById(sliderid).opacitylayer || null //reference slider container itself
if (targetobject && targetobject.currentopacity<1){
this.setopacity(sliderid, targetobject.currentopacity+0.1)
window[sliderid+"fadetimer"]=setTimeout(function(){ContentSlider.fadeup(sliderid)}, 100)
}
}


Hope this helps.

Geezer D
04-13-2008, 02:33 AM
OK, I see the actual problem, now.

There is no fade OUT in the js code.

So when you click, it just cuts out the image really quick, then fades in the new image.

That's why it's so grating to the eye, no fade out.

:(