Widget:Carousel: Difference between revisions

From MoHA Wiki
No edit summary
No edit summary
Line 1: Line 1:
  <style>
 
  .carousel-indicators {
      bottom: 50px;
  }
  </style>
   <script>
   <script>
   $.ajaxSetup({ cache: true });
   $.ajaxSetup({ cache: true });

Revision as of 01:04, October 28, 2023

 <script>
 $.ajaxSetup({ cache: true });
 $.when(
   mw.loader.getScript( 'https://cdnjs.cloudflare.com/ajax/libs/jquery.touchswipe/1.6.19/jquery.touchSwipe.min.js' )
 )
 .then(
 $(".carousel").swipe({
   swipe: function(event, direction, distance, duration, fingerCount, fingerData) {
     if (direction == 'left') $(this).carousel('next');
     if (direction == 'right') $(this).carousel('prev');
   },
   allowPageScroll:"vertical"
 });
 );
 </script>
 <a class="carousel-control-prev" href="#" role="button" data-slide="prev">Previous</a>
 <a class="carousel-control-next" href="#" role="button" data-slide="next">Next</a>