when you run the code for the first time, it correctly produces:
full load
but the second time it produces:
download full version full download
3rd time it produces:
download full version download full version full download
etc., so that the 20th time the load function completes the callback function, it fires 20 times.
$('#image-tag').load(function () {
console.log("load complete");
});
}).attr('src', 'image.jpg').appendTo('#main');
any idea what calls the callback function to repeat / increment like this?
Moudy source
share