JqueryNo Comments

default thumbnail

If you want to set 3 items at one time or in one slide then use the below amazing code. It is working.

           $('.product-slider').carousel({
		interval: false
		});

		// for every slide in carousel, copy the next slide's item in the slide.
		// Do the same for the next, next item.
		$('.product-slider .carousel-item').each(function(){
		  var next = $(this).next();
		  if (!next.length) {
			next = $(this).siblings(':first');
		  }
		  next.children(':first-child').clone().appendTo($(this));	  
		  if (next.next().length>0) {
			next.next().children(':first-child').clone().appendTo($(this));
		  } else {
			$(this).siblings(':first').children(':first-child').clone().appendTo($(this));
		  }
		});

Be the first to post a comment.

Add a comment