if :checked add class to this
<p>I have a small problem. I want to check if a checkbox is checked and if it is checked, I want to add a class to his first brother.
HTML :</p>

<pre><code>    &lt;input class="box" type="checkbox"&gt;
    &lt;p class="red"&gt;Red text &lt;/p&gt;

    &lt;input class="box" checked type="checkbox"&gt;
    &lt;p class="red"&gt;I want this text in blue &lt;/p&gt;
</code></pre>

<p>JS :</p>

<pre><code>    if(jQuery(".box").is(":checked")) {
    jQuery(this).next().attr('class', 'blue');                              
}
</code></pre>

<p>Example here : <a href="http://jsfiddle.net/LVEqn/" rel="nofollow">http://jsfiddle.net/LVEqn/</a></p>

<p>Thanks in advance !</p>
