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

Errorr #452

Open PablooGit opened 2 years ago

PablooGit commented 2 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"; } } });