Get the App
SLTechnology News&Howtos  ›  Development  › 

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

Shulou Source: shulou.com Published: 2022-06-03 04:11:09 10月03日 Update

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'])

Tags: Pictures plugins slackers content articles learning help obscene pixels areas parameters screens layout easy to understand more organization knowledge editing industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker NVidia vpn Xiaomi MySQL