aboutsummaryrefslogtreecommitdiff
path: root/js/dist/button.js
diff options
context:
space:
mode:
authorfat <[email protected]>2015-05-07 22:26:40 -0700
committerfat <[email protected]>2015-05-07 22:26:40 -0700
commit1b183e2ff796fc22aba8a8cac074a306c083d018 (patch)
treeecc5298aab8d67841e0a765e44feb0b70c872050 /js/dist/button.js
parent660505188241418ffda53b5eb848defecd5f57e1 (diff)
downloadbootstrap-1b183e2ff796fc22aba8a8cac074a306c083d018.tar.xz
bootstrap-1b183e2ff796fc22aba8a8cac074a306c083d018.zip
carousel -> es6
Diffstat (limited to 'js/dist/button.js')
-rw-r--r--js/dist/button.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/dist/button.js b/js/dist/button.js
index 76aa09a7f..20be59dc7 100644
--- a/js/dist/button.js
+++ b/js/dist/button.js
@@ -54,7 +54,7 @@ var Button = (function ($) {
function Button(element) {
_classCallCheck(this, Button);
- this.element = element;
+ this._element = element;
}
_createClass(Button, [{
@@ -64,14 +64,14 @@ var Button = (function ($) {
value: function toggle() {
var triggerChangeEvent = true;
- var rootElement = $(this.element).closest(Selector.DATA_TOGGLE)[0];
+ var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
if (rootElement) {
- var input = $(this.element).find(Selector.INPUT)[0];
+ var input = $(this._element).find(Selector.INPUT)[0];
if (input) {
if (input.type === 'radio') {
- if (input.checked && $(this.element).hasClass(ClassName.ACTIVE)) {
+ if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
triggerChangeEvent = false;
} else {
var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
@@ -83,16 +83,16 @@ var Button = (function ($) {
}
if (triggerChangeEvent) {
- input.checked = !$(this.element).hasClass(ClassName.ACTIVE);
- $(this.element).trigger('change');
+ input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
+ $(this._element).trigger('change');
}
}
} else {
- this.element.setAttribute('aria-pressed', !$(this.element).hasClass(ClassName.ACTIVE));
+ this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
}
if (triggerChangeEvent) {
- $(this.element).toggleClass(ClassName.ACTIVE);
+ $(this._element).toggleClass(ClassName.ACTIVE);
}
}
}], [{