jQuery: On document load check if checkbox is selected and do function
<p>I have few <code>&lt;li&gt;</code>'s with a checkbox on each <code>&lt;li&gt;</code> which the value of it is saved into a database. On document load, the <code>&lt;li&gt;</code>'s that have the checkbox selected, I want to add a class <strong>'.done'</strong>.</p>

<p>I tried this:</p>

<pre><code>if (currentTODO.find('.status').is(":checked")) {
            currentTODO.find('.text').addClass("done");
            alert('Test.');
    }
</code></pre>

<p>but it works only if it used under click function, mousemove etc but not on document load. Also, If I have that piece of code under on Document load, nothing else works. </p>

<p>I hope someone can help me out.</p>

<p>Thanks alot</p>
