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
path: root/js/src
diff options
context:
space:
mode:
authorRohit Sharma <rohit2sharma95@gmail.com>2020-11-25 10:35:36 +0300
committerGitHub <noreply@github.com>2020-11-25 10:35:36 +0300
commit8e59752ee1f815bbc30a06465b8d19de35a76c9d (patch)
tree00d0482754b708f20a2f02b5dde06f400c248fa8 /js/src
parent22168e9b1507e2cab2791cc119f0325eef5fa290 (diff)
Partially backport #32217 (#32225)
Remove unnecessary `_getCustomClass` method. `customClass` will be in the configuration already, even if it is provided in the data attributes, and jQuery's [`addClass()`](https://api.jquery.com/addclass/) method will handle it, either `this.config.customClass` is a function or a class name (even if it is a blank string). Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Diffstat (limited to 'js/src')
-rw-r--r--js/src/tooltip.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 0b74eb800d..9a37e73d12 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -286,7 +286,7 @@ class Tooltip {
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment))
$(tip).addClass(CLASS_NAME_SHOW)
- $(tip).addClass(this._getCustomClass())
+ $(tip).addClass(this.config.customClass)
// If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
@@ -734,10 +734,6 @@ class Tooltip {
this.config.animation = initConfigAnimation
}
- _getCustomClass() {
- return this.element.getAttribute('data-custom-class') || this.config.customClass
- }
-
// Static
static _jQueryInterface(config) {