Home  >  Article  >  Web Front-end  >  jQuery实现图片预加载效果_jquery

jQuery实现图片预加载效果_jquery

WBOY
WBOYOriginal
2016-05-16 15:29:151362browse

本文实例讲述了jQuery实现图片预加载效果代码。分享给大家供大家参考。具体如下:
运行效果截图如下:

具体代码如下:

html代码:


图片预加载

js代码:

 $(function () {
   $("[lazyLoadSrc]").YdxLazyLoad({
    onShow: function () {
     $(this).parent().next().hide()
    }
   });
 });

大家在加载图片时就会看到这种效果,现在知道是实现的过程了吧,希望大家喜欢小编分享的jQuery实现图片预加载效果。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn