Js load image

MATTHEW None 7 years ago updated by Alexander Blach (Developer) 7 years ago 1
Hi, I seem to experiencing issues displaying images from .src using jquery & js.
var _img = document.getElementById('id1');var newImg =newImage; newImg.src ='http://whatever'; newImg.onload =function(){ _img.src =this.src;}

Is that the actual code? There should be a space between "new" and "Image". Also, parentheses are missing:

var newImg = new Image();