Results 1 to 5 of 5

Thread: Multiple slideshows on same page won't always start from 1st slide

  1. #1
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Multiple slideshows on same page won't always start from 1st slide

    1) Script Title: fadeslideshow

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem: I have multiple slide shows on the same page each one activated by its own button. All appear in the same place on the page in its own div, which are all hidden. I'm using show/hide to display the relevant slideshow.
    All works fine and when you first open a slideshow it starts from the first slide, but if you return to the same slideshow it doesn't start from the beginning. I have persist: set to false and displaymode: to auto.
    Is it possible to have the slideshows always start from the first slide even if they have been visited before during the same page view?

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    If you could attach something like this:

    onclick="mygallery.navigate(0);

    to the show/hide button it should navigate to the first slide when clicked

    (try to make a search for onclick="mygallery.navigate(0); on dynamic drive, there are a lot of posts explaining it)

  3. #3
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for that. It seems to work fine for a manual slideshow, starts on the 1st slide then clicks through each slide but on auto it starts on the 1st slide ok but then won't run.

    Is there anything I should add to onclick="mygallery.setting.nav(0); to make it run on auto?

    I apologize if I'm missing something, this is all pretty new to me.

  4. #4
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    I'm not sure, but i think what I did was to change this part of the fadeslideshow.js
    Code:
    fadeSlideShow.prototype={
    
    	navigate:function(keyword){
    		var setting=this.setting
    		clearTimeout(setting.playtimer)
    		if (setting.displaymode.type=="auto"){ //in auto mode
    			setting.displaymode.type="auto" //switch to "manual" mode when nav buttons are clicked on
    			setting.displaymode.wraparound=true //set wraparound option to true
    		}
    		if (!isNaN(parseInt(keyword))){ //go to specific slide?
    			this.showslide(parseInt(keyword))
    		}
    		else if (/(prev)|(next)/i.test(keyword)){ //go back or forth inside slide?
    			this.showslide(keyword.toLowerCase())
    		}
    	},
    The red "auto" was changed from manual, and I think this will make the slideshow continue in auto mode. It should be around line 124 in the fadeslideshow.js

  5. #5
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yep, That's got it! Ain't life simple when you know the answer?

    Thanks a million, that's absolutely fantastic.

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
  •