thyCheckBox

This is a checkbox element.

CSS Classes

  • .thyCheckBox
  • .thyCheckBox_checked
  • .thyCheckBox_label
  • .thyCheckBox_contents
  • .thyCheckBox_contents_checked
  • .thyLabelPanel_label
  • .thyLabelPanel_contents

Events

onclickWhen checkbox has been clicked
onchangeWhen checkbox has been changed
oncheckWhen checkbox has been checked
onuncheckWhen checkbox has been unchecked
Summary
This is a checkbox element.
Sets the element as checked
Sets the element as unchecked
Switch the actual checked state
Appends the event listener to the contents element, as this is the correct place for this widget
Sets the CheckBox as checked or unchecked
Returns the actual checked state
Resets the checkbox to unchecked state
Wrapper to reset
Sets the default behaviour when onclick events

check

p.check = function ()

Sets the element as checked

uncheck

p.uncheck = function ()

Sets the element as unchecked

switchCheckedState

p.switchCheckedState = function ()

Switch the actual checked state

addEventListener

p.addEventListener = function (event)

Appends the event listener to the contents element, as this is the correct place for this widget

Private Methods

_populateContents

p._populateContents = function (checkedState)

Sets the CheckBox as checked or unchecked

Parameter

checkedState(boolean) true/false

_sweepOutContents

p._sweepOutContents = function ()

Returns the actual checked state

_reset

p._reset = function ()

Resets the checkbox to unchecked state

_cleanUp

Wrapper to reset

Events

_eventOnClick

p._eventOnClick = function ()

Sets the default behaviour when onclick events

p.check = function ()
Sets the element as checked
p.uncheck = function ()
Sets the element as unchecked
p.switchCheckedState = function ()
Switch the actual checked state
p.addEventListener = function (event)
Appends the event listener to the contents element, as this is the correct place for this widget
p._populateContents = function (checkedState)
Sets the CheckBox as checked or unchecked
p._sweepOutContents = function ()
Returns the actual checked state
p._reset = function ()
Resets the checkbox to unchecked state
p._eventOnClick = function ()
Sets the default behaviour when onclick events