diff options
author | Johann-S <johann.servoire@gmail.com> | 2018-06-01 15:44:21 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2018-06-03 12:40:08 +0300 |
commit | a79b8aa16ab5fa5c71a91425d8464f0bdcd3fe37 (patch) | |
tree | 201e8438a9df0d1e951bee801808a396fd3fc098 /js/src/tooltip.js | |
parent | ffd31f9b8c8b3a34df888fd66218ee74f1fcaf28 (diff) |
refactor(plugins): query elements without jquery
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r-- | js/src/tooltip.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 3d4e93f2b8..56c1aa0d15 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -418,9 +418,9 @@ const Tooltip = (($) => { } setContent() { - const $tip = $(this.getTipElement()) - this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()) - $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`) + const tip = this.getTipElement() + this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle()) + $(tip).removeClass(`${ClassName.FADE} ${ClassName.SHOW}`) } setElementContent($element, content) { @@ -655,7 +655,7 @@ const Tooltip = (($) => { _cleanTipClass() { const $tip = $(this.getTipElement()) const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX) - if (tabClass !== null && tabClass.length > 0) { + if (tabClass !== null && tabClass.length) { $tip.removeClass(tabClass.join('')) } } |