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:
authorBardi Harborow <bardi@bardiharborow.com>2016-11-21 17:36:00 +0300
committerBardi Harborow <bardi@bardiharborow.com>2016-11-24 03:59:55 +0300
commitc2616fb74e6bdc0cd46a5678a2c5cffcbe422106 (patch)
treec9f2db3c292861301816f255bbe25b9b45fdd8b2 /js/src/button.js
parent26c16743fce73db5f85c9f16fe59242f876c5360 (diff)
Make JS compliant with the new ESLint rules.
Diffstat (limited to 'js/src/button.js')
-rw-r--r--js/src/button.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/button.js b/js/src/button.js
index a7eed18262..8b95117657 100644
--- a/js/src/button.js
+++ b/js/src/button.js
@@ -66,12 +66,12 @@ const Button = (($) => {
toggle() {
let triggerChangeEvent = true
- let rootElement = $(this._element).closest(
+ const rootElement = $(this._element).closest(
Selector.DATA_TOGGLE
)[0]
if (rootElement) {
- let input = $(this._element).find(Selector.INPUT)[0]
+ const input = $(this._element).find(Selector.INPUT)[0]
if (input) {
if (input.type === 'radio') {
@@ -80,7 +80,7 @@ const Button = (($) => {
triggerChangeEvent = false
} else {
- let activeElement = $(rootElement).find(Selector.ACTIVE)[0]
+ const activeElement = $(rootElement).find(Selector.ACTIVE)[0]
if (activeElement) {
$(activeElement).removeClass(ClassName.ACTIVE)
@@ -151,7 +151,7 @@ const Button = (($) => {
Button._jQueryInterface.call($(button), 'toggle')
})
.on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {
- let button = $(event.target).closest(Selector.BUTTON)[0]
+ const button = $(event.target).closest(Selector.BUTTON)[0]
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type))
})