jQuery Lazy Load Image Plugin Lazy Load XT

Add-ons
2026-07-25 23:33 5 次浏览 • 0 次下载 1.2KB
jQuery Lazy Load Image Plugin Lazy Load XT

jQuery lazy-loading image plugin that also supports lazy loading for videos and other media.

A mobile-friendly, fast, and extensible jQuery plugin for lazy loading images and videos, with built-in support for the jQueryMobile framework.

Usage

Add jquery.lazyloadxt.min.js:

1
<script src="jquery.lazyloadxt.min.js"></script>

When replacing the src attribute with the data-src attribute, choose to add a placeholder src and a fallback image:

1
2
<img class="lazy" data-src="lazy.jpg" width="100" height="100">
<noscript><img src="lazy.jpg" width="100" height="100"></noscript>

It is recommended to keep the attribute order consistent in these two tags so that the code can be compressed efficiently with gzip.

If you use a fallback image, hide the first image using CSS (otherwise, browsers with broken JavaScript support will display both images):

1
2
3
img.lazy {
display: none;
}

The Lazy Load XT plugin removes this class during image initialization (classNojs option).


星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare