I\'ve tried some HTML DOM code from several sites, but it isn\'t working. It isn\'t adding anything. Does anyone have a working example on this?
this.img =
This works:
var img = document.createElement('img'); img.src = 'img/eqp/' + this.apparel + '/' + this.facing + '_idle.png'; document.getElementById('gamediv').appendChild(img)
Or using jQuery:
$('') .attr('src','img/eqp/' + this.apparel + '/' + this.facing + '_idle.png') .appendTo('#gamediv');