缓慢加载图像,显示临时图像的最佳方法? jQuery的也许? [英] Slow loading images, best way to display temporary image? JQuery perhaps?

查看:50
本文介绍了缓慢加载图像,显示临时图像的最佳方法? jQuery的也许?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google图表在我的应用程序中显示图表数据.有时Google速度很慢,加载图表需要一段时间.这种情况似乎已经足够普遍了-因此,我想知道在从Google提供图像的同时显示临时图像的一种好方法是什么.我可以使用jQuery-并看到了许多预加载"插件.这是我需要的吗?

I am using Google Charts to display charting data in my application. Sometimes Google is slow and the charts will take a while to load. This scenario seems to be a common enough pattern -- so I'm wondering what's a good approach to show a temporary image, while the image is delivered from Google. I have access to jQuery -- and have seen a number of "preloading" plugins. Is this what I need?

此方案/模式的正确术语真的称为图像预加载"吗?

Is the correct term for this scenario/pattern really called "image preloading"?

我很想听听人们用什么来解决这种情况.

I'd love to hear what people use to solve this situation.

谢谢

推荐答案

您可以显示在 http://加载图像时//ajaxload.info/.加载图像后,您可以隐藏加载的gif并显示图像本身.

You can show one of those fancy loading gifs found at http://ajaxload.info/ while the image is loading. After the image is loaded you hide the loading gif and show the image itself.

查看 http://jqueryfordesigners.com/image-loading/以获得教程.

这篇关于缓慢加载图像,显示临时图像的最佳方法? jQuery的也许?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆