title: How can I tell if a particular CSS property is inherited with jQuery?
body: <p>This is a very simple question, so I'll keep it really brief:</p>
  
  <p><strong>How can I tell if a particular DOM element's CSS property is inherited?</strong></p>
  
  <p>Reason why I'm asking is because with <code>jQuery</code>'s <code>css</code> method it will return the computed style, which inherits the parent object's CSS properties. Is there a way to retrieve the properties set on the object itself?</p>
  
  <p>An example might explain what I'm getting at a bit better:</p>
  
  <p>CSS:</p>
  
  <pre><code>div#container {
    color:#fff;
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="container"&gt;
    Something that should be interesting
    &lt;div class="black"&gt;
      Some other thing that should be interesting
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So, in the instance of <code>div.black</code>, which inherits <code>color</code>, how can I tell if it is inherited? </p>
  
  <p><code>$('div.black:eq(0)').css('color')</code> will obviously give me <code>#fff</code>, but I want to retrieve the style of the element <em>itself</em>, not its parents.</p>