File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 87
87
var blankImage = getOrDef ( overrides , 'blankImage' ) ,
88
88
checkDuplicates = getOrDef ( overrides , 'checkDuplicates' ) ,
89
89
scrollContainer = getOrDef ( overrides , 'scrollContainer' ) ,
90
+ forceLoad = getOrDef ( overrides , 'show' ) ,
90
91
elementOptionsOverrides = { } ,
91
92
prop ;
92
93
101
102
if ( el === window ) {
102
103
$ ( options . selector ) . lazyLoadXT ( overrides ) ;
103
104
} else {
105
+ var duplicate = checkDuplicates && $data ( el , dataLazied ) ,
106
+ $el = $ ( el ) . data ( dataLazied , ! forceLoad ? 1 : - 1 ) ;
107
+
104
108
// prevent duplicates
105
- if ( checkDuplicates && $data ( el , dataLazied ) ) {
109
+ if ( duplicate ) {
110
+ queueCheckLazyElements ( ) ;
106
111
return ;
107
112
}
108
113
109
- var $el = $ ( el ) . data ( dataLazied , 1 ) ;
110
-
111
114
if ( blankImage && el . tagName === 'IMG' && ! el . src ) {
112
115
el . src = blankImage ;
113
116
}
184
187
el = $el [ 0 ] ,
185
188
objData = $el [ lazyLoadXT ] ,
186
189
removeNode = false ,
187
- visible = force ,
190
+ visible = force || $data ( el , dataLazied ) < 0 ,
188
191
topEdge ;
189
192
190
193
// remove items that are not in DOM
You can’t perform that action at this time.
0 commit comments