Grep strings in jQuery
<p>I have a jQuery object (thisClass) that contains 2 or more class names. I am trying to figure out how to return only the class name that is in a predetermined array.</p>

<p>Something like this:</p>

<pre><code>var thisClass = $(this).attr("class");
var icons = ["glass","leaf","dog","home"];

[Use grep here to return thisClass only as a single class name that is filtered by, or contained in icons.]
</code></pre>
