Twitter Bootstrap - multiple image (thumbnail) carousel - move thumbnails one at a time

后端 未结 1 1318
天涯浪人
天涯浪人 2021-02-09 10:03

I am trying out Twitter bootstrap 3. I am quite new to HTML, CSS and Javascript. I have a carousel which i created and it\'s code looks like so:

1条回答
  •  日久生厌
    2021-02-09 10:59

    Take a look at this Bootply: http://bootply.com/94452

    You can use jQuery to clone() the items accordingly..

    $('.carousel .item').each(function(){
      var next = $(this).next();
      if (!next.length) {
        next = $(this).siblings(':first');
      }
      next.children(':first-child').clone().appendTo($(this));
    
      for (var i=0;i<2;i++) {
        next=next.next();
        if (!next.length) {
            next = $(this).siblings(':first');
        }
    
        next.children(':first-child').clone().appendTo($(this));
      }
    });
    

    Alternative option: Bootstrap carousel multiple frames at once

    0 讨论(0)
提交回复
热议问题