Results 1 to 4 of 4

Thread: Featured Content Slider v2.4 Help...

  1. #1
    Join Date
    Aug 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Featured Content Slider v2.4 Help...

    http://www.dynamicdrive.com/dynamici...tentslider.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.

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

    Default

    Try using the onChange event handler of the script to do that (see close to end of script page). For example, something like:

    Code:
    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.
    DD Admin

  3. #3
    Join Date
    Aug 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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"
    }

    Quote Originally Posted by ddadmin View Post
    Try using the onChange event handler of the script to do that (see close to end of script page). For example, something like:

    Code:
    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.

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

    Default

    To get the total length of the contents, try accessing the variable setting.contentdivs.length:

    Code:
    counter.innerHTML="You are on slide "+curindex+" of "+setting.contentdivs.length
    DD Admin

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
  •