Function toggleCheckbox

  • Set or rotate checkbox status with support for tri-state.

    An initial 'indeterminate' state becomes 'checked' on the first call.

    If the input element has the class 'wb-tristate' assigned, the sequence is:
    'indeterminate' -> 'checked' -> 'unchecked' -> 'indeterminate' -> ...
    Otherwise we toggle like
    'checked' -> 'unchecked' -> 'checked' -> ...

    Parameters

    • element: string | HTMLElement
    • Optional value: null | boolean
    • Optional tristate: boolean

    Returns void