JSFiddle - React, Tailwind, and code Playground
by lollero
HTML
<input type="checkbox" checked="checked">
<input type="checkbox" checked="checked" style="display: none;">
<input type="checkbox">
<input type="checkbox" checked="checked" style="display: none;">
<input type="checkbox" checked="checked">
<input type="checkbox">
CSS
div { float: left; background: green; }
div input { display: block !important; }
JavaScript
$('input').each(function() {
// If input is visible and checked...
if ( $(this).is(':visible') && $(this).prop('checked') ) {
$(this).wrap('<div />');
}
});