Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKotas Vlastimil <Vlastimil.Kotas@ysoft.com>2016-01-14 19:41:36 +0300
committerKotas Vlastimil <Vlastimil.Kotas@ysoft.com>2016-01-14 22:26:32 +0300
commit866e99b00cb12dcfa0d9b88edf4f4d0ef06ca3f3 (patch)
treee969c95e8d2595ee40a566d345f6e855442ede16 /js/src/button.js
parent5e893434c794b328f3c49638bfbb527f356aa6de (diff)
Button toggling - trigger change event on input
Bootstrap’s .button styles can be applied to other elements, such as labels, to provide checkbox or radio style button toggling. When the checkbox or radio state is changed, there should be triggered the change event. Currently, the change event is triggered on the Button, which is not correct. Only input fields do support the change event.
Diffstat (limited to 'js/src/button.js')
-rw-r--r--js/src/button.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/button.js b/js/src/button.js
index 3144a3f101..f5551f169e 100644
--- a/js/src/button.js
+++ b/js/src/button.js
@@ -90,7 +90,7 @@ const Button = (($) => {
if (triggerChangeEvent) {
input.checked = !$(this._element).hasClass(ClassName.ACTIVE)
- $(this._element).trigger('change')
+ $(input).trigger('change')
}
}
} else {