how to check if a div has a class out of multiple classes in jquery
<p>I have a dynamic div which can generate over 1000 different classes... its a wordpress theme.</p>

<p>Now i am wanting to check if a div has one of 52 classes.</p>

<p>.bg1, .bg2, .bg3 etc etc...</p>

<p>I know that you can use hasClass();</p>

<p>But how do I check for each one and then get the value. For instance here is the div as it stands</p>

<pre><code>&lt;div id="wordpresspost" class="bodyclass post-id-193 wordpresswrap bg1"&gt;&lt;/div&gt;
</code></pre>

<p>Please bare in mind I dont really know jquery :D</p>

<p>I was thinking it would be something like this but logically this does not make sense to me :(</p>

<pre><code>var divclass = $("#wordpresspost").hasClass('bg1, bg2, bg3, bg4, bg5, bg6');

if(divclass == true){
    var divsclass = $(this);
}
</code></pre>

<p>I need to know the class because I want to change it, for instance i would like to .removeClass and then addClass a new class without changing the others as they are dynamic</p>

<p>Thanks in advance for the advice :)</p>
