2

So my interpretation of the fadein/fadeout sync is that when the first image starts fading out the second image starts fading in however in my script I have about a second of blank space before the next image starts fading in what is this due to.

        $(function(){
            $('#up').cycle({
                fx:    'fade',
                sync:  true,
                delay: -2000
             });
        });
BillPull
  • 6,853
  • 15
  • 60
  • 99
  • Your interpretation of `sync` option is correct. Also this part of code looks good and doesn't explain that blank space. What version is jQuery and your Cycle plugin? Does this second of blank space occur only after first slide or after every slide. – pepkin88 Apr 30 '12 at 19:00
  • The example on http://jquery.malsup.com/cycle/int.html doesn't show anything like that - could you provide the detail of where you put together the HTML for the slides? – Armatus Apr 30 '12 at 19:47

1 Answers1

0

I'm not exactly sure what the question is. sync should do what you say it does. Also, you really shouldn't need sync: true at all because it's the default. Please post a jsfiddle, if possible.

But first try setting fx: 'fadeout'. See:

http://jquery.malsup.com/cycle/fadeout.html

and

https://github.com/malsup/cycle/commit/f769b0fabe925b6cf8b4b5197b8c868ceb0c9261

This fades out the "top" image to show the "bottom" image underneath in all cases, so that there's never any of what you're calling "blank space." (Alsup is a superhero and all, but it must be said that the various fx settings aren't well explained in the documentation.) The thing to understand is that the script is animating two elements (typically images) with a single thread. So, for example, if you're using the default fx setting, which is fade, and you have two dark images on top of a white background, you will see an irritating show-through of the background at the midpoint of each slide transition. (Personally, I use 'fadeout' for everything in day-to-day usage. IMHO it should really be the default setting for fx.)

Lastly, understand that delay only affects the timing of the very first transition. It has no effect on subsequent transitions.

Ben
  • 11,082
  • 8
  • 33
  • 47