be-fe / iSlider

Smooth mobile touch slider for Mobile WebApp, HTML5 App, Hybrid App
http://be-fe.github.io/iSlider/
MIT License
1.65k stars 449 forks source link

Bug: 有a标签的情况下无法滑动到下一张! #426

Open havingmeaning opened 7 years ago

havingmeaning commented 7 years ago

Example: list.push({ content: `

havingmeaning commented 7 years ago

It is very easy! We can use flag to work out this problem! My code:

var isLinkTo = 1; var S = new iSlider(document.getElementById('rec-silder'), list, { isAutoplay: 0, isLooping: 1, isOverspread: false, animateTime: 800, plugins: ['dot'], renderComplete: function () { }, onSlideStart: function (e) { isLinkTo = 1; }, onSlide: function (e) { isLinkTo = 0; }, onSlideEnd: function (e) { if (isLinkTo === 1) { window.location.href = "www.baidu.com"; } } });