jQuery预加载图像

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jQuery预加载图像相关的知识,希望对你有一定的参考价值。

I believe that Accrisoft has a fetch all images from db function built in, but you could always use some php to create the image array
  1. $.preloadImages = function() {
  2. for (var i = 0; i<arguments.length; i++) {
  3. img = new Image();
  4. img.src = arguments[i];
  5. }
  6. }
  7. $.preloadImages (
  8. "path_to_image_array",
  9. "path_to_image_array",
  10. "path_to_image_array"
  11. );

以上是关于jQuery预加载图像的主要内容,如果未能解决你的问题,请参考以下文章