Change swiper options

1 reply · opened Apr 6, 2021

Eema_xpsApr 6, 2021

Hello,

It is possible to change some default Swiper options in custom js file?
One of my problems is that my Swiper stop autoplay after I slide it with finger.
I've read that it's possibile to configure it with some code, for example...

var mySwiper = new Swiper ('.swiper-container', {
  autoplay: {
        disableOnInteraction: false
    }
...

How can I write the code without initializing a new Swiper?

Thank you.

SSemicolon WebSTAFFApr 7, 2021

Hello,

Unfortunately, this is currently not supported. To add this setting, you will need to manually edit the Source JS File: js/plugins.swiper.js and add your setting in the Swiper JS Initialization codes.

If you are using the js/plugins.js or the js/plugins.min.js File, you will need to Update the above codes in these Files as well. More information on using Javascript Files is available here; http://docs.semicolonweb.com/docs/getting-started/javascript/ . Consider trying this minifier: https://javascript-minifier.com/ for the js/plugins.min.js File.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard