mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-15 11:59:39 +03:00
Convert offcanvas.js to vanilla JS.
This commit is contained in:
@@ -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')
|
||||
})
|
||||
})
|
||||
}())
|
||||
|
||||
Reference in New Issue
Block a user