How to make the simplest slider on js or jquery? there are a few pictures so that they replace each other after some specific time

    3 answers 3

    Create a div equal in size to one image. Set it overflow: hidden property. Inside it, place a block with pictures (as many pictures as you need). You set the margin-left property to this internal block: -the width of one picture. Then, via setTimeout or setInterval, you start the function that will first change the margin-left to zero (via JQuery.Aminate, for example), and then simultaneously transfer the rightmost image to the beginning and set the margin-left again: -the width of one picture.

    • is there an example? - Ruslan Sabanov
    • @ Ruslan Sabanov, a great example of @Heidel threw off, look at the first link - sinedsem

    The taste and color - http://yeap.narod.ru/js/022.html