title: $(selector).css() is not working
body: <p>I have an html div element in a variable</p>
  
  <pre><code>var rows = "";
  rows += "&lt;div&gt;1111 : Hi there&lt;/div&gt;";
  </code></pre>
  
  <p>I have tried to add background color to this div by following but everything failed.</p>
  
  <pre><code>1.  $(rows).css({'background-color':'#FF0000'});
  2.  $(rows).css({'background-color':'#FF0000 !important'});
  3.  $(rows).css({backgroundColor:'#FF0000'});
  4.  $(rows).css({backgroundColor:'#FF0000 !important'});
  5.  $(rows).css('background-color','#FF0000');
  6.  $(rows).css('background-color','#FF0000 !important');
  
  7.  $(rows).find('div').css({'background-color':'#FF0000'});
  8.  $(rows).find('div').css({'background-color':'#FF0000 !important'});
  9.  $(rows).find('div').css({backgroundColor:'#FF0000'});
  10. $(rows).find('div').css({backgroundColor:'#FF0000 !important'});
  11. $(rows).find('div').css('background-color','#FF0000');
  12. $(rows).find('div').css('background-color','#FF0000 !important');
  </code></pre>
  
  <p>May be there is selector problem but got</p>
  
  <p><code>Object[div]</code> output from <code>console.log($(rows));</code></p>
  
  <p>So I think selector is working fine.</p>
  
  <p>After adding css, this div is appended to other div</p>
  
  <pre><code>$("#parentDiv").append(rows);
  </code></pre>
  
  <p>After inspecting from firebug</p>
  
  <p>I got only <code>&lt;div id='parentDiv'&gt;&lt;div&gt;1111 : Hi There&lt;/div&gt;&lt;/div&gt;</code>
  there is no css added to this div.</p>
  
  <p>If I use inline css it is working fine so I think there is no css to override color</p>
  
  <pre><code>rows += "&lt;div style='background-color:#FF0000'&gt;1111 : Hi there&lt;/div&gt;";
  </code></pre>
  
  <p>jQuery is working fine for other things.</p>
  
  <p>What is wrong with this code, Can anybody help please....</p>
  
  <p>Thanks.</p>