EDIT: The problem is that I would like to add more such identical .containers, but the code above fades out/fades in all of them simultaneously, not just "this" (where mouse pointer is) container.:) I would greatly appreciate it if someone can help me tweak the code, so it works with each container indepedently.
I'm new to this forum and jQuery and would like to ask for your help.:) I have this code for an automatic image cycler and I really like the smoothness of the crossfade, it also works independently with identical .wrappers containing children divs:
$(".wrapper").on("click", function() { var $content = $(this).children();
if ($content.length > 1) {
var $curr = $content.filter(":visible"); var $next = $curr.is($content.last()) ? $content.first() : $curr.next();
$next.fadeIn(2000) $curr.fadeOut(2000) } });
And also have this nice code for an automatic version of the cycler which allows to click-control it, but its crossfade effect looks not as as the one's above. I would like to have both versions of the cycler (on click and automatic) using the same smooth crossfade above.
The question: can someone help me make ∨this code crossfade images as smoothly as ∧this code? I would greatly appreciate any help.
$(".wrapper_auto").each(function() { var $this = $(this), $curr = null, $crossfade = $this.find(".crossfade_square"); var zindex = -1, length = $crossfade.length;