Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to load pictures in lazy style with jquery plug-in

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you the "jquery plug-in how to achieve lazy load picture", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "jquery plug-in how to achieve lazy load picture" this article.

{insert_scripts files='jquery-1.8.3.min.js,jquery.lazyload.js,use_img_lazyload.js'}

/ / file use_img_lazyload.js

/ / /

Function checkbrowse () {

Var ua = navigator.userAgent.toLowerCase ()

Var is = (ua.match (/\ b (chrome | opera | safari | msie | firefox)\ b /) | | [', 'mozilla']) [1]

Var r ='(?:'+ is +'| version) [\ /:] ([\\ d.] +)'

Var v = (ua.match (new RegExp (r) | | []) [1]

JQuery.browser.msie = is

JQuery.browser.version = v

Return {

'is': jQuery.browser.msie

'ver': jQuery.browser.version

}

}

Var public = checkbrowse ()

Var showeffect = ""

If ((public ['is'] = =' msie' & & public ['ver'])

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report