I have an unordered list (which can nest) such as:
<div id="checklist">
<ul>
<li>On Page SEO
<ul>
<li>My work <i>And note.</i>
<li>Your work <i>Blah</i>
</ul>
</li>
<li>Is this love?</li>
</ul>
</div>
On document ready, I want to add a checkbox to each <li> tag BEFORE the text. I currently have the following which adds it AFTER the text:
$(document).ready(function () {
$('<input type="checkbox" value="1" />').appendTo('li');
});