Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript problem with jquery image slider

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37397
    matthewb
    Member

    Hi warriors
    I m new to jquery had just tried to make a horizontal image slider. Problem is clicking on ‘next’ btn should not work when on last slide, same with ‘prev’ button.

    can any one help me out.

    http://jsfiddle.net/matthew_b/6zrnW/1/

    #100208
    Melanie27
    Member

    You need to add a step to both your previous and next functions – for example:

    $(“#next”).click( function(){
    alert(‘hi’);
    $(current).animate({left: “-=1500px”, top: “0px”}),

    {

    step: function(right) {
    if (left <= 1500px) { //Slide width x number of slides $(current).stop(true, true);
    }

    }

    });

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.