We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example: list.push({ content: <div class="rec-silder-cell"> <a href="${this.recommends[i].linkUrl}"> <img src="${this.recommends[i].picUrl}" /> </a> </div> }); 如果有a标签的话,在我滑动到下一张的过程中,页面直接发生跳转。 其实我想要的效果,就是在我滑动的时候,页面不要应该发生跳转。而页面发生跳转的时候,仅仅只是我点击的时候!
<div class="rec-silder-cell"> <a href="${this.recommends[i].linkUrl}"> <img src="${this.recommends[i].picUrl}" /> </a> </div>
The text was updated successfully, but these errors were encountered:
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"; } } });
Sorry, something went wrong.
No branches or pull requests
Example:
list.push({
content:
<div class="rec-silder-cell"> <a href="${this.recommends[i].linkUrl}"> <img src="${this.recommends[i].picUrl}" /> </a> </div>
});
如果有a标签的话,在我滑动到下一张的过程中,页面直接发生跳转。
其实我想要的效果,就是在我滑动的时候,页面不要应该发生跳转。而页面发生跳转的时候,仅仅只是我点击的时候!
The text was updated successfully, but these errors were encountered: