Sidebar.js w/o jquery
This commit is contained in:
parent
20295558d1
commit
ee80ee45d6
1 changed files with 5 additions and 7 deletions
|
|
@ -1,12 +1,10 @@
|
||||||
// https://bootstrapious.com/p/bootstrap-sidebar
|
// https://bootstrapious.com/p/bootstrap-sidebar
|
||||||
$(document).ready(function () {
|
document.addEventListener('DOMContentLoaded', function(){
|
||||||
|
document.querySelector('#sidebarCollapse').addEventListener('click', function () {
|
||||||
$('#sidebarCollapse').on('click touch', function () {
|
document.querySelector('#sidebar').classList.remove('active');
|
||||||
$('#sidebar').removeClass('active');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#sidebarShow').on('click touch', function () {
|
document.querySelector('#sidebarShow').addEventListener('click', function () {
|
||||||
$('#sidebar').addClass('active');
|
document.querySelector('#sidebar').classList.add('active');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue