Change input when div state changes
<p>I have this div and this input:</p>

<pre><code>&lt;fieldset&gt;
    &lt;input/&gt;
    &lt;label&gt;&lt;/label&gt;
    &lt;div class="toggle_box"&gt;
        &lt;div class="switch"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/fieldset&gt;
</code></pre>

<p>I want the input to be <code>checked</code> when the state of <code>&lt;div class="switch"&gt;&lt;/div&gt;</code> changes:</p>

<pre><code>&lt;fieldset&gt;
    &lt;input checked="checked" /&gt;
    &lt;label&gt;&lt;/label&gt;
    &lt;div class="toggle_box"&gt;
        &lt;div class="switch" state="on"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/fieldset&gt;
</code></pre>

<p>Any idea how I would do that using jQuery?
Thank you :)</p>
