Didn't work. thanks for trying though, Liam.

I believe the bug may be in jQuery 1.3.2 itself because this is the
first time I've ever had a bug I can't just narrow down to a section
of code.

On Aug 13, 11:00 am, Liam Potter <radioactiv...@gmail.com> wrote:
> try changing
>
> $("a.sl_next").click(slNext);
> $("a.sl_back").click(slBack);
>
> to
>
> $("a.sl_next").click(function(){slNext});
> $("a.sl_back").click(function(){slBack});
>
> no idea if this will work btw
>
>
>
> Brad wrote:
> > Basically, I can click the next button and go forward until it reaches
> > the last slide then it sticks. The Back button is also broken. This
> > code works great with 1.3.1 and 1.2.6 but has the aforementioned bugs
> > in 1.3.2....
>
> > $(document).ready(function() {
> >    var fadeSpeed = 1000;
> >    var currentSlide = 0;
> >    var setSeconds = 1200;
> >    var pauseAuto = setSeconds;
>
> >    setInterval(slAuto, 1000);
> >    $("a.sl_next").click(slNext);
> >    $("a.sl_back").click(slBack);
>
> >    $("#slideshow li").hide();
> >    $("#slideshow li:first").show();
>
> >    var totalSlides = $("#slideshow li").length;
>
> >    $("#slideshow li").each(function() {
> >            var slIndex = $("#slideshow li").index(this);
> >            slIndex++;
> >            $(this).find(".sl_of").text("" + slIndex + " of " + totalSlides);
> >    });
>
> >    function slAuto() {
> >            if (pauseAuto != 0) { pauseAuto--; } else {
> >                    pauseAuto = setSeconds;
> >                    moveNext();
> >                    return false;
> >            }
> >    }
>
> >    function slNext() {
> >            pauseAuto = setSeconds;
> >            moveNext();
> >            return false;
> >    }
>
> >    function slBack() {
> >            pauseAuto = setSeconds;
> >            moveBack();
> >            return false;
> >    }
>
> >    function moveNext() {
> >            $("#slideshow li:eq(" + currentSlide + ")").fadeOut(fadeSpeed);
> >            if (currentSlide == (totalSlides - 1)) { currentSlide = 0; } else
> > { currentSlide++; }
> >            $("#slideshow li:eq(" + currentSlide + ")").fadeIn(fadeSpeed);
> >    }
>
> >    function moveBack() {
> >            $("#slideshow li:eq(" + currentSlide + ")").fadeOut(fadeSpeed);
> >            if (currentSlide == 0) { currentSlide = (totalSlides - 1); } else
> > { currentSlide--; }
> >            $("#slideshow li:eq(" + currentSlide + ")").fadeIn(fadeSpeed);
> >    }
>
> > });

Reply via email to