Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. $('#myCarousel').carousel({
  2. interval: 4000
  3. });
  4.  
  5. $('.carousel .item').each(function () {
  6. var next = $(this).next();
  7. if (!next.length) {
  8. next = $(this).siblings(':first');
  9. }
  10. next.children(':first-child').clone().appendTo($(this));
  11.  
  12. for (var i = 0; i < 4; i++) {
  13. next = next.next();
  14. if (!next.length) {
  15. next = $(this).siblings(':first');
  16. }
  17.  
  18. next.children(':first-child').clone().appendTo($(this));
  19. }
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement