2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-30 15:24:08 +03:00

refactor(plugins): improve how we query elements

This commit is contained in:
Johann-S
2018-04-30 16:37:45 +02:00
parent 62cc0fda50
commit b1eb3fccfa
6 changed files with 34 additions and 26 deletions
+2 -2
View File
@@ -333,8 +333,8 @@ const Dropdown = (($) => {
return
}
const toggles = $.makeArray($(Selector.DATA_TOGGLE))
for (let i = 0; i < toggles.length; i++) {
const toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE))
for (let i = 0, len = toggles.length; i < len; i++) {
const parent = Dropdown._getParentFromElement(toggles[i])
const context = $(toggles[i]).data(DATA_KEY)
const relatedTarget = {