Hello, I want to the change an image and do some action after loading.
Following snipet is used: js: $(document).ready( function() { $("#clickableElement").click(function() { $('#imageID').attr("src", 'http://IMAGEURL/img.jpg').load (function() { alert(1); }); }); } html: ... <div id="clickableElement>Click me</div> <img src="currentImage" alt="Image" /> If I click on the "clickableElement" a new image is loaded as expected and after that a messagebox with "1" appears. Now I click a second time and I will get 2 messageboxes. The third time 3 and so on.. What's wrong, why does this happen?