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

容器内元素事件代理 #232

Closed
lt1030 opened this issue Jul 6, 2015 · 5 comments
Closed

容器内元素事件代理 #232

lt1030 opened this issue Jul 6, 2015 · 5 comments

Comments

@lt1030
Copy link

lt1030 commented Jul 6, 2015

dom类型,两个li,均为多个图片的展示容器,li内容器设置了overflow: auto, 想通过scroll事件监听容器内图片显示位置,按需加载,现在islider把scroll屏蔽掉了,用islider.bind("scroll", "", function(){})代理也没有效果,请问有什么建议么?

@xieyu33333
Copy link
Member

设置fixPage: false

@lt1030
Copy link
Author

lt1030 commented Jul 6, 2015

非常感谢你的快速回复,已经设置fixpage: false,两个li是左右滑动的,设置之后在图片容器内可以上下滑动了,就是对图片容器设置不了scroll监听事件

@xieyu33333
Copy link
Member

iSlider没有屏蔽scroll事件

@lt1030
Copy link
Author

lt1030 commented Jul 6, 2015

你说的是正确的,确实没有屏蔽,不过也设置不上对容器的scroll监听,zepto或者islider内置bind都不好用,只能用touchstart了,不知道有没有什么不良影响!~谢谢你的回答

@xieyu33333
Copy link
Member

你看一下滚动条是在哪一个容器上的,是不是监听对了,另外在老版本的设备上div内是无法设置滚动条的,只能在body上设置。

@lt1030 lt1030 changed the title 急!!!容器内元素事件代理 容器内元素事件代理 Sep 17, 2015
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