Widget:Carousel: Difference between revisions

From MoHA Wiki
No edit summary
No edit summary
Line 1: Line 1:


   <script>
   <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>
   </script>
   <a class="carousel-control-prev" href="#<!--{$id}-->" role="button" data-slide="prev"><!--
   <a class="carousel-control-prev" href="#<!--{$id}-->" role="button" data-slide="prev"><!--

Revision as of 01:05, October 28, 2023

 <script>
 </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>