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

觉得图片是否加载的判断点应该在图片本身而不是容器 #7

Open
tyrion-yu opened this issue Mar 19, 2016 · 1 comment

Comments

@tyrion-yu
Copy link

目前是容器进入区域,就一股脑的把里面的图片全去加载了。
比如手机上,无限加载的列表页,每次ajax得到16~32个图片地址,插入进ul列表,所有图片会同时去加载,没得到想要的效果。

api应该是传入图片的容器,但是应该判断容器里的每个图片是否进入可视区。

@barretlee
Copy link
Owner

应该还要添加一个 add 函数,将动态加入的元素添加到检测队列中。

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