swiper: Swiper with RequireJS (TypeError: f.wrapper.transition is not a function)

Hi,

When I use Swiper with RequireJS sometimes I get such error:

TypeError: f.wrapper.transition is not a function
...)},f.setWrapperTransition=function(e,a){f.wrapper.transition(e),"slide"!==f.para...

swiper.....min.js (line 15, row 29993)

Is it possible to use Swiper with RequireJS?

Thanks in advance!

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 20 (3 by maintainers)

Most upvoted comments

It’s fixed!!!

this error has confused me 2 days.now it’s fixed! this issue fixed in 3.1.0 with swiper.jquery.umd.js.@nolimits4web you are right. when i use swiper.jquery.umd.js ,everything runs well. thank you for your comment @nolimits4web ,but i give you -1. because your comment is not very clear …

@nolimits4web I got the same error ,when i use swiper in requirejs. require([‘jquery’,‘underscore’,‘swiper’],function($,_,Swiper) {

    var mySwiper = new Swiper ('.swiper-container', {
        // direction: 'vertical',
        loop: true,

        // 如果需要分页器
        pagination: '.swiper-pagination'

    });

i’ve got this error aswell and solved this with using native javascript swiper, not jquery swiper

Should be fixed in 3.1.0 with swiper.jquery.umd.js