title: Add class to element if there is a attribute in JQuery
body: <p>How to I add a class to a div element when it has a 'style' attribute containing variable data?</p>
  
  <pre><code>    &lt;div style="background-color: #000;"&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>What I want to achieve is a script that automatically adds a class <code>post-with-bg</code> to every div element with the above properties.</p>