Skip to content
New issue

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

动态元素bug #20

Open
pengaman opened this issue Feb 20, 2017 · 2 comments
Open

动态元素bug #20

pengaman opened this issue Feb 20, 2017 · 2 comments

Comments

@pengaman
Copy link

一个ul里的li动态变化,给这个ul的父元素绑定插件后会出现bug,建议在init中加上
me.$el.off();

@ximan
Copy link
Owner

ximan commented Feb 20, 2017

你好,可否简单讲一下什么情况下会出现什么bug?
只提供解决方案,我难加上去,非常感谢,期待你的答复!

@pengaman
Copy link
Author

pengaman commented Feb 20, 2017

html:
<div id=‘pic’><ul></ul></div>
js:
function createli(){ createnode... $("#pic").swipeSlide(); }
ul里的li是动态的,新创建li之后(例如之前有三个li,现在有一个),再次绑定pic后,新的li(也就是一个li时)依然能滑动。
当然我这是个例,因为有这个需求。
ps:还在初始化的时候加了
me.$el.children('ul').css({'-webkit-transform':'translate3d(0,0,0)','transform':'translate3d(0,0,0)'});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants