Advanced Search

Results 1 to 3 of 3

Thread: Ultimate Fade-in slideshow (v2.4) doesn't automatically start on page land

  1. #1
    Join Date
    Feb 2013
    Location
    Bay Area
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow (v2.4) doesn't automatically start on page land

    1) Script Title: Ultimate Fade-in slideshow (v2.4)

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

    3) Describe problem: I am using the ultimate fade-in slideshow on a site. I have a total of three galleries on the homepage. Here is a link to the site.

    I have a delay on the middle and right galleries, using these instructions.

    When a user first goes to the homepage, the slideshow does not play. If the homepage is refreshed or revisited it plays. This is an issue since the idea is for the slideshow to automatically start when a user lands on the homepage. This happens in Firefox , Chrome, and Safari (mac) and Firefox and IE 9 (PC.)

    Is my code correct? I am strong in HTML & CSS, but don't have Javascript skills.

    Thanks for any advice!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,701
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    Get rid of the highlighted:

    Code:
    fadeSlideShow.sync = function(){
    	fadeSlideShow.sync.gals = fadeSlideShow.sync.gals || [];
    	fadeSlideShow.sync.duration = fadeSlideShow.sync.duration || 0;
    	fadeSlideShow.sync.gals.push(this);
    	fadeSlideShow.sync.duration = Math.max(fadeSlideShow.sync.duration, this.setting.fadeduration);
    	if(fadeSlideShow.sync.gals.length !== fadeSlideShow.sync.numGals){return;}
    	var thegals = fadeSlideShow.sync.gals;
    	fadeSlideShow.sync.duration *= 1.1;
    
    	function over(e){
    		var id = this.id, typeBool = e.type === 'mouseenter', showHide = typeBool? 'show' : 'hide';
    		jQuery.each(thegals, function(i, gal){
    			if(gal.setting.wrapperid !== id){
    				gal.setting.ismouseover = typeBool;
    				if(gal.setting.descreveal === 'ondemand'){gal.showhidedescpanel(showHide);}
    			}
    		});
    	}
    
    	setTimeout(function(){
    		jQuery.each(thegals, function(i, gal){
    			gal.setting.$wrapperdiv.bind('mouseenter mouseleave', over);
    			gal.setting.playtimer = setTimeout(
    				function(){
    					gal.setting.displaymode.type = 'auto';
    					gal.showslide('next');
    				},
    			gal.setting.displaymode.pause + (gal.setting.displaymode.delay || 0));
    		});
    	}, fadeSlideShow.sync.duration);
    };
    Oh, and since you have no descriptions or links in the slideshow, and because sync is lost if you pause it, and because the pause doesn't seem to pause all the shows anyway, you might want to use this version:

    Code:
    fadeSlideShow.sync = function(){
    	fadeSlideShow.sync.gals = fadeSlideShow.sync.gals || [];
    	fadeSlideShow.sync.duration = fadeSlideShow.sync.duration || 0;
    	fadeSlideShow.sync.gals.push(this);
    	fadeSlideShow.sync.duration = Math.max(fadeSlideShow.sync.duration, this.setting.fadeduration);
    	if(fadeSlideShow.sync.gals.length !== fadeSlideShow.sync.numGals){return;}
    	var thegals = fadeSlideShow.sync.gals;
    	fadeSlideShow.sync.duration *= 1.1;
    
    	setTimeout(function(){
    		jQuery.each(thegals, function(i, gal){
    			gal.setting.$wrapperdiv.bind('mouseenter mouseleave', function(){gal.setting.ismouseover = false;});
    			setTimeout(
    				function(){
    					gal.setting.displaymode.type = 'auto';
    					gal.showslide('next');
    				},
    			gal.setting.displaymode.pause + (gal.setting.displaymode.delay || 0));
    		});
    	}, fadeSlideShow.sync.duration);
    };
    
    fadeSlideShow.sync.numGals = 3; //required - set to number of galleries
    That way it won't pause at all, and so will stay in sync the entire time.
    Last edited by jscheuer1; 03-01-2013 at 04:56 AM. Reason: add Oh, and . . .
    - John
    ________________________

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

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

    DWooly (03-01-2013)

  4. #3
    Join Date
    Feb 2013
    Location
    Bay Area
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    John,
    It works perfectly now! I used the second version of the code. Thanks for the time and information.
    -Danica

Similar Threads

  1. Black start to Ultimate Fade-in slideshow
    By dmgood in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-04-2011, 02:01 PM
  2. Ultimate Fade-in Slideshow re-start
    By cockatoo in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 11-30-2010, 12:18 PM
  3. Ultimate Fade-In Slideshow - how to delay start
    By ragandboneshop in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 07-04-2010, 06:45 AM
  4. Resolved start delay for Ultimate Fade-in slideshow
    By simonzebu in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 06-21-2009, 08:59 AM
  5. Ultimate Fade-in slideshow -- How to start on command?
    By Brad in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-03-2006, 08:45 AM

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
  •