 <p>Your first example you have no period before <code>'ui-state-highlight'</code> so you are trying to select elements with a TYPE of ui-state-highlight (as opposed to a type of DIV, INPUT, SELECT, etc)</p> <pre><code> $('ui-state-highlight') </code></pre> <p>Your second example you actually select elements with a class of 'ui-state-default'</p> <pre><code> $('.ui-state-default') </code></pre> <p><strong>Edit:</strong> Based on your corrections I am guessing that the problem here is that you may be trying to get the background color for any elements with the ui-state-highlight class but there aren't any actually displayed on your page.</p> <p>Try the following code, based on answer to <a href="http://stackoverflow.com/questions/2707790/get-a-css-value-from-external-style-sheet-with-javascript-jquery">Get a CSS value from external style sheet with Javascript/jQuery</a></p> <pre><code>var $p = $("&lt;p class='ui-state-highlight'&gt;&lt;/p&gt;").hide().appendTo("body"); input = $p.css("background"); $p.remove(); </code></pre> <p>You create a new <code>&lt;p&gt;&lt;/p&gt;</code> temporarily and then grab the background color off it before removing it.</p>