title: jsdom and jquery modifying css style of dom elements
body: <p>I have been using jdom and jquery with my node.js server, and have observed the following strange behavior with the following code:</p>
  
  <pre><code>var divs = window.$('div').each(function() {
                //console.log(" -", $(this));
                $(this).css('background-color','green');
                $(this).addClass('sel');
                this.style.backgroundColor = "green";
              });
  </code></pre>
  
  <p>I tried to add some style (background color to green) to the divs on the html page using every way I could think.  All of the above attempts (I also tried them one by one to see if any of them worked independently) produced the same results, equivalent to: <code>&lt;div id="somedivid" style=""&gt;</code></p>
  
  <p>I wonder if this is a bug, since it won't write any style to it (Always empty inside the quotes), yet adds the style attribute when these divs didn't have one before if you check the original document.  Adding the class sel which I created manually at the top of the page in a custom css style block DOES work, however, exactly like you would think it should.  The issue is that I really want to be able to dynamically change the style of individual objects while using jsdom.  Anyone have any ideas if this is a bug or if I have overlooked something?</p>
  
  <p>By the way, this code works in a normal browser running standard jquery as well just as expected, so it seems likely to be the jsdom implementation somehow.</p>