title: jQuery append text
body: <p>I want to append some simple data in a div like:</p>
  
  <pre><code>$('#msg').append('Some text');
  </code></pre>
  
  <p>In the  body, i think i will need to place the the html like.</p>
  
  <pre><code>&lt;div id="test"&gt;    
  
  &lt;div id="msg"&gt;&lt;/div&gt;  //show text inside it.
  
  &lt;/div&gt;
  </code></pre>
  
  <p>However, I want to add some CSS to the <code>#msg</code>. For example, background color. Now the problem is that, since the <code>#msg</code> div is present all the time, i see the  background color even when the text is not appended to it. I have tried to add css like "display:none, but in that case i can not see the text appended to it.
  Can i do it so that the <code>#msg</code> div appears inside the <code>#test</code> only when the text is appended to it? Thanks.</p>