0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Fix application.js after aaf03bd

This commit is contained in:
XhmikosR 2019-07-15 17:33:45 +03:00
parent d39977271c
commit ef98fbdb84

View File

@ -19,19 +19,18 @@
return [].slice.call(list)
}
var sidenavGroups = document.querySelectorAll('.js-sidenav-group')
var groupHasLinks
var groupLink
sidenavGroups.forEach(sidenavGroup => {
groupHasLinks = Boolean(sidenavGroup.querySelector('li'))
groupLink = sidenavGroup.querySelector('a')
if (groupHasLinks) {
groupLink.addEventListener('click', function (e) {
e.preventDefault()
e.target.parentNode.classList.toggle('active')
}, true)
}
})
makeArray(document.querySelectorAll('.js-sidenav-group'))
.forEach(function (sidenavGroup) {
var groupHasLinks = Boolean(sidenavGroup.querySelector('li'))
var groupLink = sidenavGroup.querySelector('a')
if (groupHasLinks) {
groupLink.addEventListener('click', function (e) {
e.preventDefault()
e.target.parentNode.classList.toggle('active')
}, true)
}
})
// Tooltip and popover demos
makeArray(document.querySelectorAll('.tooltip-demo'))