0

Js load image

MATTHEW None 6 years ago updated by Alexander Blach (Developer) 6 years ago 1
Hi, I seem to experiencing issues displaying images from .src using jquery & js.
e.g.
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();