Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/jquery.lazyloadxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// options
var lazyLoadXT = 'lazyLoadXT',
dataLazied = 'lazied',
load_error = 'load error',
load_error = 'load loadeddata error',
classLazyHidden = 'lazy-hidden',
docElement = document.documentElement || document.body,
// force load all images in Opera Mini and some mobile browsers without scroll event or getBoundingClientRect()
Expand Down Expand Up @@ -159,6 +159,9 @@
* @param {Event} e
*/
function triggerLoadOrError(e) {
if (e.type === 'loadeddata') {
e.type = 'load';
}
triggerEvent(e.type, $(this).off(load_error, triggerLoadOrError));
}

Expand Down