How can I use swiper on IE? is there any solution?
Asked Answered
I

3

5

Swiper slider is okay on chrome but in the internet explorer, it is not working how I fix this anyone has a solution of this? if yes please share it Thanks

Infest answered 23/7, 2020 at 14:52 Comment(0)
I
0

I do some research on Swiper slider and I got that swiper didn't work for Internet Explorer but the only version 2.xx version that works for an older browser, I tried but it didn't work for me. After done a little more research on sliders then I got a Slick slider that works the same as swiper. It also works for Internet Explorer and other browsers. I do some sud of code as I did before in the swiper

$('.slider').slick({
  slidesToShow: 5,
  slidesToScroll: 1,
  speed: 500,
  dots: true,
  arrows: false,
  centerMode: false,
  focusOnSelect: false,
  autoplay: true,
  autoplaySpeed: 2000,
  slide: 'div',
  responsive: [
      {
      breakpoint: 900,
      settings: {
          slidesToShow: 4,
          slidesToScroll: 1,
      }
      },
      {
      breakpoint: 425,
      settings: {
          slidesToShow: 3,
          slidesToScroll: 1
      }
      },
      {
      breakpoint: 375,
      settings: {
          slidesToShow: 2,
          slidesToScroll: 1
      }
      }
      // You can unslick at a given breakpoint now by adding:
      // settings: "unslick"
      // instead of a settings object
  ]
});

with this HTML

<div class="slider">
<div class="item"><img src="images/logo1.png" alt="Logo"></div>
<div class="item"><img src="images/logo2.png" alt="Logo"></div>
<div class="item"><img src="images/logo3.png" alt="Logo"></div>
<div class="item"><img src="images/logo4.png" alt="Logo"></div>
<div class="item"><img src="images/logo5.png" alt="Logo"></div>
</div>

I also linked the cdn files for more information please visit the official slick site here

Infest answered 25/7, 2020 at 11:28 Comment(0)
P
6

I tested the official demo in IE 11 and it can't work. I found that Swiper has dropped IE 11 support since v5. You could check this commit and this thread. Now the latest version is v6.0.4 so it can't work in IE 11.

If you want to use Swiper on IE 11, I think you can use v4.x which is the latest version that supports IE. For more information, you could refer to this thread.

Prober answered 24/7, 2020 at 3:41 Comment(4)
Thanks for your answer! but I got the solution I tried v2.xx this is the version that works for IE but it didn't works, after a little research I got that I use alternative slider of swiper, which is a slick slider that works for IE.Infest
Glad that you have solved the issue! You could also post your detailed solution as an answer and mark your answer as an accepted answer after 48 hrs, when it is available to mark. It can help other community members in future in similar kind of issues. Thanks for your understanding.Prober
Sure! I'll update the answer. Thanks for letting me knowInfest
I've got swiper 5.4.5 and works well in IE11. I confirm tat swiper 6 does not.Loadstar
I
0

I do some research on Swiper slider and I got that swiper didn't work for Internet Explorer but the only version 2.xx version that works for an older browser, I tried but it didn't work for me. After done a little more research on sliders then I got a Slick slider that works the same as swiper. It also works for Internet Explorer and other browsers. I do some sud of code as I did before in the swiper

$('.slider').slick({
  slidesToShow: 5,
  slidesToScroll: 1,
  speed: 500,
  dots: true,
  arrows: false,
  centerMode: false,
  focusOnSelect: false,
  autoplay: true,
  autoplaySpeed: 2000,
  slide: 'div',
  responsive: [
      {
      breakpoint: 900,
      settings: {
          slidesToShow: 4,
          slidesToScroll: 1,
      }
      },
      {
      breakpoint: 425,
      settings: {
          slidesToShow: 3,
          slidesToScroll: 1
      }
      },
      {
      breakpoint: 375,
      settings: {
          slidesToShow: 2,
          slidesToScroll: 1
      }
      }
      // You can unslick at a given breakpoint now by adding:
      // settings: "unslick"
      // instead of a settings object
  ]
});

with this HTML

<div class="slider">
<div class="item"><img src="images/logo1.png" alt="Logo"></div>
<div class="item"><img src="images/logo2.png" alt="Logo"></div>
<div class="item"><img src="images/logo3.png" alt="Logo"></div>
<div class="item"><img src="images/logo4.png" alt="Logo"></div>
<div class="item"><img src="images/logo5.png" alt="Logo"></div>
</div>

I also linked the cdn files for more information please visit the official slick site here

Infest answered 25/7, 2020 at 11:28 Comment(0)
M
0

At the company I work at, we had to support IE11 which is a headache like everyone knows. After hours of googling and trying out different fixes, I finally found one!

I downgraded swiper to v3.4.2 and switched to using the Swiper jQuery file instead of the regular swiper.js file and tada! it worked!

If anyone is facing this issue in 2021, this is the fix for you.

Use the swiper.jquery.min.js file here. The way to use swiper changes a little bit in v3.4.2 from the latest version so you'd need to look at some of the examples to make your code works correctly.

Marelya answered 2/6, 2021 at 11:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.