mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-11 08:04:59 +02:00
refactor(plugins): query elements without jquery
This commit is contained in:
@@ -106,7 +106,7 @@ const Tab = (($) => {
|
||||
}
|
||||
|
||||
if (selector) {
|
||||
target = $(selector)[0]
|
||||
target = document.querySelector(selector)
|
||||
}
|
||||
|
||||
this._activate(
|
||||
@@ -199,7 +199,8 @@ const Tab = (($) => {
|
||||
$(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
|
||||
const dropdownElement = $(element).closest(Selector.DROPDOWN)[0]
|
||||
if (dropdownElement) {
|
||||
$(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)
|
||||
const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE))
|
||||
$(dropdownToggleList).addClass(ClassName.ACTIVE)
|
||||
}
|
||||
|
||||
element.setAttribute('aria-expanded', true)
|
||||
|
Reference in New Issue
Block a user