title: item.appendChild is not a function
body: <p>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.</p>
  
  <pre><code>var item = document.createElement("div").className = "item";
  var img = document.createElement("img").src = imgpath + $(this).attr("href");;
  item.appendChild(img);
  </code></pre>
  
  <p>Any help is appreciated!</p>
  
  <p>EDIT:</p>
  
  <pre><code>var item = document.createElement("div");
  item.className = "item";
  var img = document.createElement("img");
  img.src = imgpath + $(this).attr("href");
  item.append(img);
  </code></pre>
  
  <p>This throws the same error.</p>