I am trying to stop the loading of images with javascript on dom ready and then init the loading whenever i want, a so called lazy loading of images. Something like this:
I don't know if you have written wrong in the question but the attribute the you should set to an empty string is "src" not "img". Try this:
$(document).ready(function () { var images = $('img'); $.each(images, function() { $(this).attr('src', ''); }); });