title: creating container through javascript
body: <p>Im trying to create container through javascript and set the css properties.</p>
  
  <p>for some reason, the below code does not work.</p>
  
  <p>js</p>
  
  <pre><code>var maincontainer = $('#maincontainer');
  var tablecontainer = $('&lt;div/&gt;',{'class':'tablecontainer'});
  maincontainer.append(tablecontainer);
  </code></pre>
  
  <p>css</p>
  
  <pre><code>#maincontainer{
    background-color:black;
    width:500px;
    height:200px;
  }
  #tablecontainer{
    background-color:black;
    width:500px;
    height:200px;
  }
  </code></pre>