I need to make changes to the javascript triggers 'ready' and 'ajaxStop' for the Lazy Load plugin.
$(document).ready(function() {
$("img.lazy").lazyload({
threshold:50,
skip_invisible : false,
effect: "fadeIn"
}).removeClass("lazy");
});
$(document).ajaxStop(function() {
$("img.lazy").lazyload({
threshold:50,
skip_invisible : false,
effect: "fadeIn"
}).removeClass("lazy");
});
Is there a way to simplify this code, perhaps by creating a new function like:
$(document).any-possible-function(function() {
...
});
Any assistance in optimizing the code would be greatly appreciated.