Results 1 to 4 of 4

Thread: modifying Featured Content Slider v2.4

  1. #1
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default modifying Featured Content Slider v2.4

    1) Script Title:

    Featured Content Slider v2.4

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...tentslider.htm

    3) Describe problem:

    I modified the gallery "Example2" to my graphical needs, but I would love to show a description to every image, let's say in in different <div> under the pagination. Is this difficult to do?
    Someone could me there?

    thanks to everybody!!!

  2. #2
    Join Date
    Aug 2004
    Posts
    9,918
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    You can use the "onChange" event handler within the initialization code to do this. Something like:

    Code:
    var description=new Array()
    description[0]="Image description 1"
    description[1]="Image description 2"
    description[2]="Image description 3"
    
    featuredcontentslider.init({
    id: "slider1", //id of main slider DIV
    contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
    toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc]
    nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide.
    enablefade: [true, 0.2], //[true/false, fadedegree]
    autorotate: [true, 3000], //[true/false, pausetime]
    onChange: function(previndex, curindex){ //event handler fired whenever script changes slide
    document.getElementById("describediv").innerHTML=description[curindex-1]
    }
    })
    See the script page for more info on this event handler.
    DD Admin

  3. #3
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I created
    <div id="describediv" class="description"> lukas </div>

    but how do I get the various contents in it?
    I suppose I have to build some inner divs?

  4. #4
    Join Date
    Aug 2004
    Posts
    9,918
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    The descriptions themselves would be defined inside the script as an array:

    Code:
    var description=new Array()
    description[0]="Image description 1"
    description[1]="Image description 2"
    description[2]="Image description 3"
    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
  •