I'm using cycle malsup plugin. In my callback function onBefore, I have a fadeOut effect but It seems the before function trigger only a moment and the next slide appears before my fadeOut effect completed.
How to make the before function trigger in a longer time? Here's my code:
$('.slideshow').before("<div id='nav'>").cycle({ fx : 'scrollRight', fxFn : custom, speed : 500, pause : 1, before : onBefore, timeout : 6000, after : onAfter, slideExpr : 'div.layer', sync : false }); function onBefore (curr,next,opts,fwd) { $(blah blah).fadeOut('slow'); }