How do I get a checkbox to show as "intermediate" when unchecked in Materialize ?
HTML:
<input type="checkbox" id="test" checked/>
<label for="test" id="test-label">Red</label>
JS:
$('#test-label').click(function() {
var checkbox = $(this).prev();
if (!$(checkbox).is(':checked'))
$(checkbox).prop('intermediate', true);
});
Aucun commentaire:
Enregistrer un commentaire