When I try using the bootstrap switch library for checkboxes it works fine if the checkbox is placed inside other than a <li> tag. If I place the checkbox inside a <li> tag it won't work.
Adding the code snippet below. Any help would be appreciated.
HTML
<li>
<div class="mt-comment-actSwitch">
<input type="checkbox" name="publishCheckBox"
data-on-text="<i class='fa fa-check'></i>"
data-off-text="<i class='fa fa-times'></i>"
class="make-switch publishCheckBox"
data-size="mini" data-on-color="success" data-off-color="warning">
</div>
</li>
<br><br>
<div class="mt-comment-actSwitch">
<input type="checkbox" name="publishCheckBox"
data-on-text="<i class='fa fa-check'></i>"
data-off-text="<i class='fa fa-times'></i>"
class="make-switch publishCheckBox"
data-size="mini" data-on-color="success" data-off-color="warning">
</div>
JS
$('.publishCheckBox').bootstrapSwitch();
Output

Try escape special characters and close
</input>tag:Reference: