1
|
$ bower
install
jquery.lazyload
|
1
|
$ npm
install
jquery-lazyload
|
1
2
|
<script src=
"jquery.js"
></script>
<script src=
"jquery.lazyload.js"
></script>
|
1
2
3
4
5
6
|
<
img
class
=
"lazy"
data-original
=
"img/example.jpg"
style
=
"margin-top:1000px"
height
=
"200"
>
<
script
>
$(function(){
$("img.lazy").lazyload();
})
</
script
>
|
1
2
3
4
5
|
$(
function
(){
$(
"img.lazy"
).lazyload({
event :
"click"
});
[align=left][color=rgb(0, 0, 0)][font="]})
|
1
2
3
4
|
$(
function
(){[/size][/font][/backcolor] $(
"img.lazy"
).lazyload({
event :
"click"
});
})
|
01
02
03
04
05
06
07
08
09
10
11
|
$(
function
() {
$(
"img.lazy"
).lazyload({
event :
"sporty"
});
});
$(window).bind(
"load"
,
function
() {
var
timeout = setTimeout(
function
() {
$(
"img.lazy"
).trigger(
"sporty"
)
}, 5000);
});
|
1
2
3
|
$(
"img.lazy"
).lazyload({
effect :
"fadeIn"
});
|
01
02
03
04
05
06
07
08
09
10
|
<
div
style
=
"height:600px;overflow:scroll"
id
=
"container"
>
<
img
class
=
"lazy"
data-original
=
"img/example.jpg"
alt
=
""
style
=
"margin-top:1000px"
height
=
"200"
>
</
div
>
<
script
>
$(function(){
$("img.lazy").lazyload({
container: $("#container")
});
})
</
script
>
|
1
2
3
|
$(
"img.lazy"
).lazyload({
failure_limit : 10
});
|
1
2
3
|
$(
"img.lazy"
).lazyload({
skip_invisible :
true
});
|