View Full Version : Featured Content Slider v2.4 Help...
teyderacs
08-26-2009, 05:08 PM
http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
anyone know how to add something like this to the featured content slider
I have the pagination working but I would like to display a number for the first slide and one for the last slide
example would be
< You are on slide 3 of 10 >
< > these are the pagination arrows I am using images for them..
any help would be great.
ddadmin
08-27-2009, 03:37 AM
Try using the onChange event handler of the script to do that (see close to end of script page (http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm)). For example, something like:
onChange: function(previndex, curindex){
var counter=document.getElementById("counter")
counter.innerHTML="You are on slide "+curindex+" of 10"
}
Where "counter" is a blank DIV that will contain the counter.
teyderacs
08-27-2009, 01:54 PM
This worked great.. but where it says 10 is there a way to spit out or count the total number of items in the slider?
thanks
Tey
onChange: function(previndex, curindex){
var counter=document.getElementById("counter")
counter.innerHTML="You are on slide "+curindex+" of 10"
}
Try using the onChange event handler of the script to do that (see close to end of script page (http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm)). For example, something like:
onChange: function(previndex, curindex){
var counter=document.getElementById("counter")
counter.innerHTML="You are on slide "+curindex+" of 10"
}
Where "counter" is a blank DIV that will contain the counter.
ddadmin
08-27-2009, 10:30 PM
To get the total length of the contents, try accessing the variable setting.contentdivs.length:
counter.innerHTML="You are on slide "+curindex+" of "+setting.contentdivs.length
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.