From a79b8aa16ab5fa5c71a91425d8464f0bdcd3fe37 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Fri, 1 Jun 2018 14:44:21 +0200 Subject: refactor(plugins): query elements without jquery --- js/src/tooltip.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/src/tooltip.js') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 3d4e93f2b..56c1aa0d1 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('')) } } -- cgit v1.2.3