99
rated 0 times
[
100]
[
1]
/ answers: 1 / hits: 22828
/ 9 Years ago, tue, april 21, 2015, 12:00:00
I know this is a very common error but I have read and read and can't figure it out why. It's probably something very easy but I can't solve it by myself.
var item = document.createElement(div).className = item;
var img = document.createElement(img).src = imgpath + $(this).attr(href);;
item.appendChild(img);
Any help is appreciated!
EDIT:
var item = document.createElement(div);
item.className = item;
var img = document.createElement(img);
img.src = imgpath + $(this).attr(href);
item.append(img);
This throws the same error.
More From » html