I want to add a <span> element inside <label> with jQuery:
jQuery('.custom-checkbox2 label').wrapInner('<span class="circle"></span>');
This is a default state:
<div class="custom-checkbox2">
<input type="checkbox" id="chcb">
<label for="chcb">Text</label>
</div>
This is what I want:
<div class="custom-checkbox2">
<input type="checkbox" id="chcb">
<label for="chcb">
<span class="circle"></span>Text
</label>
</div>
And this result I'm getting:
<div class="custom-checkbox2">
<input type="checkbox" id="chcb">
<label for="chcb">
<span class="circle">Text</span>
</label>
</div>