我在更新面板中使用了javascript(swiper)。
我有问题,当刷新更新面板一旦swiper不再工作
<div class="swiper-container">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<div id="swiperwrapper" runat="server" class="swiper-wrapper">
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="swiper-pagination">
</div>
<div class="swiper-button-next">
</div>
<div class="swiper-button-prev">
</div>
</div>
<script src="js/swiper/swiper.min.js"></script>
<script>
var swiper = new Swiper('.swiper-container', {
slidesPerView: 4,
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
pagination: '.swiper-pagination',
paginationType: 'none'
});
</script>