jQuery check if attribute contain substring
<p>Here's my problem: Consider the following html:</p>

<pre><code>&lt;div id="item1" class="green_large"&gt;
&lt;div id="item2" class="green_large"&gt;
&lt;div id="item2" class="green_small"&gt;
&lt;div id="item4" class="yellow_large"&gt;
&lt;div id="item5" class="yellow_large"&gt;
</code></pre>

<p>How do I check if <strong>$(this)</strong> contain a class name with the substring "yellow" for example using jQuery?</p>

<pre><code>$("div").click(function() {

    if ($(this).contains_the_class_with_the_substring_yellow?) {
        // do something
    }
}
</code></pre>
