How to load pictures in lazy style with jquery plug-in
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'])