jQuery closest() not grabbing element
<p>Ok the .closest() function is not grabbing the element correctly or AT ALL so the class is not being added to the div. What's wrong here?</p>

<p>HTML:</p>

<pre><code>&lt;div class="half control-group"&gt;
        &lt;div class="form-status"&gt;&lt;/div&gt;
        &lt;?php
        echo form_label('Username', 'username');
        echo form_input(array('name' =&gt; 'username', 'maxlength' =&gt; 25, 'value' =&gt; set_value('username') ));
        ?&gt;
    &lt;/div&gt;
</code></pre>

<p>JQuery:</p>

<pre><code>success: function(label) {
    $(label).text('');
    $(label).closest('div[class="form-status"]').addClass('success');
    //label.text('OK!').addClass('valid').closest('.control-group').addClass('success');
}
</code></pre>

<p>It's making the text go to blank correctly, but it's not changing the closest form-status div class... i even tried closest('.form-status') and it still won't grab it.
I'm using the validate jQuery plugin.
When you start typing it adds this HTML underneath the input bars:</p>

<pre><code>&lt;label for=​"name" generated=​"true" class=​"error valid" style&gt;​​&lt;/label&gt;​
</code></pre>

<p>FOR ANYONE LOOKING FOR THE CORRECT ANSWER, THIS WORKED:</p>

<pre><code>label.closest('.control-group').find('div.form-status').addClass('success');
</code></pre>
