jQuery: If class contains
<p>I have the following code:</p>

<p><code>var testAnswer = $(this).attr("class");</code></p>

<p>and then a check like so:</p>

<p><code>if (testAnswer === "true") { /* some jazz */</code></p>

<p>This works fine if I have <code>class="true"</code> but NOT if I have <code>class="true single-line"</code> presumably because I'm looking for an exact match instead of if it contains the word true in the class.</p>

<p>How do I do this?</p>

<p>Thanks</p>
