Skip to content

Conversation

interlee
Copy link

The switch triggers change event during initialization, which can be tricky to handle if we were to use the change event for invoking ajax for updating the changed value. So, the change event won't get called during the initialization.

interlee and others added 7 commits August 28, 2013 16:34
…back). Pubic method:isChecked, readOnly

*** Options Added ***
font_size: 10,              // Set the label font-size. Added by Daniel Lee
read_only: false,           // Set to readonly mode if true. Added by Daniel Lee
init: function() {},        // callback function for initialization Added by Daniel Lee
on_toggle: function() {}   // callback function for initialization Added by Daniel Lee

*** Public Methods Added ***
// Check the value of the current status
isChecked: function()

// Set/Unset read only
readOnly: function(value)
The switch triggers change event during initialization, which can be tricky to handle if we were to use the change event for invoking ajax for updating the changed value. So, the change event won't get called during the initialization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants