mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
trying the load callback
This commit is contained in:
+12
-9
@@ -1,24 +1,27 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
$("img.lazy").lazyload({
|
$("img.lazy").load(lazyload_done).lazyload({
|
||||||
effect: "fadeIn",
|
effect: "fadeIn",
|
||||||
threshold: 300,
|
threshold: 300,
|
||||||
placeholder: "",
|
placeholder: ""
|
||||||
skip_invisible: false
|
});
|
||||||
}).removeClass("lazy").removeAttr('width').removeAttr('height');
|
|
||||||
|
|
||||||
$(document).ajaxStop(function() {
|
$(document).ajaxStop(function() {
|
||||||
$("img.lazy").lazyload({
|
$("img.lazy").load(lazyload_done).lazyload({
|
||||||
effect: "fadeIn",
|
effect: "fadeIn",
|
||||||
threshold: 300,
|
threshold: 300,
|
||||||
placeholder: "",
|
placeholder: ""
|
||||||
skip_invisible: false
|
});
|
||||||
}).removeClass("lazy").removeAttr('width').removeAttr('height');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function wrap_overlib() {
|
function wrap_overlib() {
|
||||||
var ret = overlib.apply(null,arguments);
|
var ret = overlib.apply(null,arguments);
|
||||||
$('div#overDiv img').removeAttr('width').removeAttr('height');
|
$('div#overDiv img').removeAttr('width').removeAttr('height').removeClass('lazy');
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
function lazyload_done() {
|
||||||
|
$(this).removeAttr('width').removeAttr('height').removeClass('lazy');
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user