如何在 jScrollPane 中延迟加载图像?
我想使用 jScrollPane 作为图像库的缩略图导航器,但有些库有数百张图像,通常不需要加载。
所以我基本上希望加载前几个可见图像,然后如果用户滚动窗格以查看当前相册中的其他图像,则当它们接近窗格的视口时加载可见的图像。
我已经尝试过 jQuery 的延迟加载插件,它似乎不会在带有溢出自动的 div 内触发。
I would like to use jScrollPane as a thumbnail navigator for an image gallery, but some of the galleries have several hundered images, which oftentimes does not need to be loaded.
So i basically want to have the first few visible images loaded, and then if the user scrolls the pane to view other images in the current album, the images getting visible is loaded as they get near the viewport of the pane.
I have tried the lazyload plugin for jQuery, which does not seem to trigger inside a div with overflow auto.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,该插件的代码不久前已更新。这是存储库链接:
https://github.com/tuupola/jquery_lazyload
希望这次能成功,否则你仍然可以尝试这两种选择:
http://ivorycity.com /blog/2011/04/19/jquery-lazy-loader-load-html-and-images-on-scroll
http://www.stylifyyourblog.com/2011/10/integrating -lazy-load-into-blogger.html
From what I can see the code for the plugin has been updated not so long ago. Here's the repository link:
https://github.com/tuupola/jquery_lazyload
Hope it works this time else you can still have a go at those two alternatives:
http://ivorycity.com/blog/2011/04/19/jquery-lazy-loader-load-html-and-images-on-scroll
http://www.stylifyyourblog.com/2011/10/integrating-lazy-load-into-blogger.html