luis-almeida/unveil

$(this).load(function()

gitncw opened this issue · 2 comments

$("img").unveil(200, function() {
$(this).load(function() {
this.style.opacity = 1;
});
});

Firefox does not work!

tzws commented
        $("img").unveil(300, 
		function() {
			$(this).load(function() {
				this.style.opacity = 1;
			});
		});

jQuery event aliases like .load, .unload or .error are deprecated since jQuery 1.8, try to register listeners instead. In short replace $(this).load(function() with $(this).on("load", function(), it should work