diff --git a/src/assets/js/js.js b/src/assets/js/js.js new file mode 100644 index 0000000..c2658a9 --- /dev/null +++ b/src/assets/js/js.js @@ -0,0 +1,22 @@ +jQuery(document).ready(function( $ ) { + $('#carouselExample').on('slide.bs.carousel', function (e) { + + var $e = $(e.relatedTarget); + var idx = $e.index(); + var itemsPerSlide = 3; + var totalItems = $('.carousel-item').length; + + if (idx >= totalItems-(itemsPerSlide-1)) { + var it = itemsPerSlide - (totalItems - idx); + for (var i=0; i