title: appendChild returning Cannot read property 'containerDiv' of undefined
body: <p>I am trying to add a div element to my top level div container, but for some reason I get an error.</p>
  
  <p>Here's my code. It's a button, that once you click, is supposed to add a box on the screen.</p>
  
  <p>To avoid the jQuery bug with <code>this.</code>, I defined a variable on top of my class, called <code>self</code></p>
  
  <pre><code>var self = this;
  </code></pre>
  
  <p>So this fixes the jQuery bug.</p>
  
  <pre><code>$(this.button).click(function() {
          self.newContainer = new divGenerator();
  
          self.containerDiv.parentNode.appendChild(self.newContainer.divContainer);
  
      });
  </code></pre>
  
  <p>What's really weird is that when I print out</p>
  
  <pre><code>console.log("self.newContainer: "+self.newContainer.containerDiv);
  </code></pre>
  
  <p>I get "<code>self.newContainer: [object HTMLDivElement]</code>" as the result. And an HTMLDivElement is exactly what I need, right? It's a node, and appendChild() needs a node element. So everythign seems right. But it's not. Why?</p>