diff --git a/doc/api.html b/doc/api.html index 7885bbb..ae2280c 100644 --- a/doc/api.html +++ b/doc/api.html @@ -173,6 +173,17 @@

Options

+ + tristate + boolean + false + Sets tristate support. + + NEW + v4.3.0 + + + @@ -180,7 +191,7 @@

Options

Methods

Methods can be used to control toggles directly.

- +
@@ -244,14 +255,38 @@

Methods

- + + + + + + + + + + + + - +
readonly $('#toggle-demo').bootstrapToggle('readonly') + Disables the toggle but the checkbox stay enabled - + + NEW + v4.3.0 + +
indeterminate$('#toggle-demo').bootstrapToggle('indeterminate') + Sets the toggle to 'indeterminate' state + + NEW + v4.3.0 + +
determinate$('#toggle-demo').bootstrapToggle('determinate') + Sets the toggle to 'determinate' state + NEW v4.3.0
diff --git a/doc/event.html b/doc/event.html index e37edc8..016be62 100644 --- a/doc/event.html +++ b/doc/event.html @@ -25,7 +25,7 @@

Event Propagation

</script>

Stopping Event Propagation

-

Passing true to the on, off and toogle methods will enable the silent option to prevent the control from propagating the change event in cases where you want to update the controls on/off state, but do not want to fire the onChange event.

+

Passing true to the on, off, toggle, determinate and indeterminate methods will enable the silent option to prevent the control from propagating the change event in cases where you want to update the controls on/off state, but do not want to fire the onChange event.

+

Tristate Toggle

+

+ Simply add tristate to enable a three state toggle. + + NEW + v4.3.0 + +

+
+ +
+

Colors

Bootstrap Toggle implements all standard bootstrap 5 button colors.

diff --git a/doc/notice.html b/doc/notice.html index 118241c..16ee6f8 100644 --- a/doc/notice.html +++ b/doc/notice.html @@ -25,7 +25,7 @@

Made for Bootstrap 5!

style="font-size:24px">
- Supports outline colors + Includes a mini (-xs) size
@@ -38,7 +38,11 @@

Made for Bootstrap 5!

style="font-size:24px">
- Includes a mini (-xs) size + With jQuery and vanilla JavaScript (ECMAS) interfaces + + NEW + v4.3.0 +
@@ -51,7 +55,7 @@

Made for Bootstrap 5!

style="font-size:24px">
- With jQuery and vanilla JavaScript (ECMAS) interfaces + Supports three states toggle NEW v4.3.0 diff --git a/src/script.js b/src/script.js index 5283609..13391bd 100644 --- a/src/script.js +++ b/src/script.js @@ -94,5 +94,14 @@ Demo.prototype.enable = function (selector) { Demo.prototype.disable = function (selector) { $(selector).bootstrapToggle("disable"); }; +Demo.prototype.readonly = function (selector) { + $(selector).bootstrapToggle("readonly"); +}; +Demo.prototype.indeterminate = function (selector) { + $(selector).bootstrapToggle("indeterminate"); +}; +Demo.prototype.determinate = function (selector) { + $(selector).bootstrapToggle("determinate"); +}; demo = new Demo();