1

Swipe on Carousel does not work on mobile on load (with "data-touch" is set to true) unless we click the next button first.

When i try to swipe on the mobile device to next item of the Bootstrap carousel it's not working on the first slide but if i used the arrows to change the slide and i went back to the first slide, the swipe works. I tried to add data-ride="carousel" also i tried this JQuery code :

$('#product-carousel').carousel();"

but it didn't fix the problem. How can i fix this issue?

Abdo Rabah
  • 1,670
  • 2
  • 15
  • 31
  • Hi Abdo, see if this works.... https://stackoverflow.com/questions/21349984/how-to-make-bootstrap-carousel-slider-use-mobile-left-right-swipe – Cutey from Cute Code Nov 12 '21 at 08:22
  • Did you managed to resolve this? I am having the same issue. The first slide doesn't let me swipe. – RA19 May 17 '22 at 09:53
  • @RA19 I experimented the same issue with Bootstrap 5.2 and the issue was reported [here](https://github.com/twbs/bootstrap/issues/37295). – MrUpsidown Oct 19 '22 at 13:06
  • Does anyone have a solution for this for Bootstrap 4.5 ? Swipe on first slide as well? – basZero Jan 27 '23 at 07:00

1 Answers1

-3

Please apply

<div id="myCarousel" class="carousel slide" data-interval="false" data-touch="true" data-ride="carousel">

or

<div id="myCarousel" class="carousel slide" data-bs-interval="false" data-bs-touch="true" data-bs-ride="carousel">

depends on existing slider data

Orsa Web
  • 1
  • 1