johansenj/Caffeinated-Img-Load — Issue #1: Window resize is triggered for elements not in the DOM
Author: robwalch
Created: 2012-03-04 18:01:55+00:00
State: open

If the contents of a container with Caffeinated-Img-Load images is emptied and given a new set of Caffeinated-Img-Load images, an acception occurs when the window is resized:

function dynamicContent() {
$('#container')
.empty()
.html('

')//add as many items as necessary
.find('img').lazyload({
container: $('#container')
, skip_invisible: false
});
}

1. click somewhere runs dynamicContent() - everything OK
2. click somewhere again runs dynamicContent() again:

From the plugin:

$(window).on("resize", null, null, function() {
>> return $.data(_this.element, "plugin_" + pluginName).update();
});