Results 1 to 3 of 3

Thread: Ultimate Fade-in slideshow - disable fadein on first image in persistent mode

  1. #1
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow - disable fadein on first image in persistent mode

    1) Script Title: Ultimate Fade-in slideshow

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

    3) Describe problem:

    Hi,

    am using this script in persistent mode (remembers image last shown and goes on from last image) and would like it to behave in this way:

    when I navigate between pages of site the slideshow always fades in the current image - undesirable for me. It should fade only between images in slideshow, but it should not fade in the very first image in persistent mode.

    Am using this slideshow as a background in div behind textual content.

    Am too stupid to change the code myself so I'd be most thankful if someone could help me.

    Thx

    ndru

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Are your images all the same size and do you have the dimensions of the slideshow set to those dimensions? If so, just add this after the newfadeshow call:

    Code:
    ;(function($, gal){
    	var set, id, num;
    	if((gal = window[gal]) && (num = fadeSlideShow.routines.getCookie("gallery-" + (id = (set = gal.setting).wrapperid)))){
    		$('head').append('<style type="text/css">#' + id + ', #' + id + ' .gallerylayer { background-image: url(' + set.imagearray[num][0] + ')!important;}</style>');
    	}
    })(jQuery, 'mygallery');
    where mygallery is the variable for that show, ex:

    Code:
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    			["http://i26.tinypic.com/11l7ls0.jpg", "#what", "", "<a style='color: #fff;' href='http://www.google.com/'>Nothing</a> beats relaxing next to the pool when the weather is hot."],
    			["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
    			["http://i30.tinypic.com/531q3n.jpg"],
    			["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
    		],
    	displaymode: {type:'auto', pause:4000, cycles:0, wraparound:false},
    	persist: true, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	descreveal: /apple|google/i.test(navigator.vendor)? "always" : "ondemand",
    	togglerid: ""
    })
    ;(function($, gal){
    	var set, id, num;
    	if((gal = window[gal]) && (num = fadeSlideShow.routines.getCookie("gallery-" + (id = (set = gal.setting).wrapperid)))){
    		$('head').append('<style type="text/css">#' + id + ', #' + id + ' .gallerylayer { background-image: url(' + set.imagearray[num][0] + ')!important;}</style>');
    	}
    })(jQuery, 'mygallery');
    It will still fade in the very first time. That can be prevented as well if need be. But after the cookie is set, all subsequent loads will be without fade for the first image, whichever one it might be.
    - 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:

    ndru83 (07-02-2011)

  4. #3
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Works great. Thank you for your time, you're genius !

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
  •