Results 1 to 5 of 5

Thread: Stop on Last Slide - Featured Content Slider v2.4

  1. #1
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Stop on Last Slide - 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:

    Hi,

    Looking to get the above script to stop after just one (automatic) cycle of the DIVs. If we have 6 slides, I would like it to stop automatically advancing once the 6th slide has loaded.

    Any help would be appreciated. Thanks.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,902
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Try the below modified .js file, which should cause the slider to always stop at the very last slide.
    DD Admin

  3. #3
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Worked

    Brilliant, thanks very much - works a treat.

  4. #4
    Join Date
    Sep 2014
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi,
    I know this is an old thread but figured it may be more desirable to reply as opposed to create a new thread on an old topic -- please advise otherwise.

    I was looking for the same solution as the original post, but don't see the modified .js file mentioned in the resolution.

    I appreciate the assistance.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    The script has been updated since this. The previous modified file would no longer work as intended for the current version. Please start a new thread.

    But just adding the highlighted as shown as the on page init's onChange function should do the trick:

    Code:
    <script type="text/javascript">
    
    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(){
    	if(this.currentpage === this.contentdivs.length){
    		featuredcontentslider.cleartimer(this, window["fcsautorun"+this.id]);
    	}
    }
    })
    
    </script>
    Any questions, please feel free to start a new thread and refer back to this one.
    Last edited by jscheuer1; 09-23-2014 at 04:42 PM. Reason: found a solution
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    cjallan (09-23-2014)

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
  •