iDangerous Swiper plugin reset slides

2019-07-07 01:14发布

问题:

I am using the iDangerous Swiper plugin. I need to periodically change all the slides in an ajax method. What would be the best method to do the same.

回答1:

  • call destroy() on Swiper
  • remove/replace all you slides with new ones
  • clear style attribute on .swiper-wrapper
  • initialize swiper again


标签: swiper