有一個需求是點擊一個按鈕更滑swiper中的數(shù)據(jù)。我如何把原有生成的swiper刪除,加上新數(shù)據(jù)后在生成swiper呢?cSwiper(".he");function cSwiper(class) { var swiper = new Swiper(class, { paginationClickable: true, lazyLoading: true, preventClicks: false }); return swiper } $(".show li").click(function{ //刪除舊的 $(".he").html(newhtml); // 生成新的});
swiper如何在同一個容器中新建一個swiper?
眼眸繁星
2018-08-07 10:05:16