简体   繁体   English

如何在加载了jQuery Media Boxs库时显示框/图像

[英]How to display boxes / images as an when it loaded with jquery media boxes library

I have integrated the Jquery mediabox ( http://www.castlecodeweb.com/mediaboxes/documentation/index.html ) for representing the image gallery. 我已经集成了Jquery媒体框( http://www.castlecodeweb.com/mediaboxes/documentation/index.html ),以表示图像库。

For few images it working fine but when there are thousands of images than it waiting for all images to be load first into the browser and than after it starting to display the images. 对于很少的图像,它可以正常工作,但是当有成千上万张图像时,它等待所有图像首先加载到浏览器中,然后再等待开始显示图像。

So due to this holding behavior of this library user have to wait for more than 5 mins first time until all the images will get load first. 因此,由于此库的这种保留行为,用户必须第一次等待5分钟以上,直到所有图像都将首先加载。

So can you please share if there is any option available like when first few boxes/images loaded than let's start to display instead of waiting for all the boxes/images ? 因此,您是否可以分享是否有可用的选项,例如加载前几个盒子/图像之后开始显示而不是等待所有盒子/图像?

Thanks in advance. 提前致谢。

you can solve this problem like that, in first time you need to load in mediaboxes only just 4-5 images, to fill view on first open page. 您可以这样解决此问题,在第一次时,您只需要在Mediabox中仅加载4-5张图像即可填充第一个打开的页面上的视图。 After, you need to make jquery scripts on event on scroll to load more images and add (insert) it to mediaboxes. 之后,您需要在滚动事件时制作jquery脚本,以加载更多图像并将其添加(插入)到媒体盒中。

If you read documentation here method insert, you will understand what i mean. 如果您在此处阅读方法插入文档,您将理解我的意思。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM