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

Convert offcanvas.js to vanilla JS.

This commit is contained in:
XhmikosR 2018-11-28 21:46:06 +02:00
parent e04a5139ab
commit 709dcb98dd

View File

@ -1,7 +1,7 @@
$(function () {
(function () {
'use strict'
$('[data-toggle="offcanvas"]').on('click', function () {
$('.offcanvas-collapse').toggleClass('open')
})
document.querySelector('[data-toggle="offcanvas"]').addEventListener('click', function () {
document.querySelector('.offcanvas-collapse').classList.toggle('open')
})
}())