Indeterminate Checkboxes

Ach wie spannend es gibt einen Indeterminate Zustand bei Checkboxen:

You can’t make a checkbox indeterminate through HTML. There is no indeterminate attribute. It is a property of checkboxes though, which you can change via JavaScript.

$("#some-checkbox").prop("indeterminate", true); // prop is jQuery 1.6+

The indeterminate state is visual only. The checkbox is still either checked or unchecked as a value and will submit that value to the form it is a part of.

 

bvt

 

One thought on “Indeterminate Checkboxes

Comments are closed.