Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#goButton').click(function(e){
- $('#hello').empty();
- $('#hello').append($('<img />').attr({
- src: "http://www.vision-call.co.uk/images/stories/events/sample.jpg",
- onload: "alert('hello');"
- }));
- });
- $('img').load(function() {
- alert("jquery");
- });
- $('#goButton').click(function(e){
- $('#hello').empty();
- var newImage = $('<img />').attr({
- src: "http://www.vision-call.co.uk/images/stories/events/sample.jpg",
- onload: "alert('hello');"
- }).on('load', function() {
- alert("jquery");
- });
- $('#hello').append(newImage);
- });
- $('#goButton').click(function(e){
- $('#hello').empty();
- $('#hello').append($('<img />').attr({
- src: "http://www.vision-call.co.uk/images/stories/events/sample.jpg",
- onload: "alert('hello');"
- })).promise().done(function(){alert("jquery");});
- });
- $('#goButton').click(function(e){
- $('#hello').empty();
- $('#hello').append($('<img />').attr({
- src: "http://www.vision-call.co.uk/images/stories/events/sample.jpg",
- onload: "loader()"
- }));
- });
- var loader = function() {
- alert('hello');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement