Swiper JS not working?

Hi,

I’m trying to make a slider with swiper JS. I watched many Youtube videos and replicated code from them and just from the swiper initialization code, but it doesn’t seem to work. What am I doing wrong? I want images (products) beneath my video in an automatic slider that loops. But I cant even slide through it. If don’t add a max width to my slides they also take up the full width of the page and then I only see 1 slide which is also very weird.

Hope you guys can help me out because it’s pretty frustrating.


Here is my site Read-Only: Webflow - TwenteTrailer

Can you share the live link too? Javascript doesn’t work in webflow so i’ll only be able to see it there

Although just from looking at your code, you have an extra curly brace, delete line 8

image

This is the live site: Bomech Aanbouwen - Eurotier

I also deleted line 8 but it still is not working. Thanks for the help!

Okay so pretty sure this should be the issue. In Webflow, all class names are converted to lowercase when you publish, with dashes instead of spaces. So your “Swiper” class becomes “swiper”, but your code is targeting “Swiper” and is case sensitive so doesn’t find it. Change this to lowercase and I don’t see any other reason why it wouldn’t work

image

Good to know, unfortunately, it still doesn’t work. You can try with the same link.

Seems to be working now?

Yes I see, had to delete my cache. Thanks for your help, I appreciate it!

1 Like