Merge branch 'finadev' of https://gitlab.com/erahn/voting into backup

This commit is contained in:
nurafrinaalimi16
2024-04-28 09:34:00 +08:00
2 changed files with 20 additions and 0 deletions
+1
View File
@@ -1,4 +1,5 @@
require('./bootstrap.js');
require('./helper/autocloseMenu.js');
//window.VueRouter = require('vue-router').default;
//import VueRouter from 'vue-router';
import Util from './util.js';
+19
View File
@@ -0,0 +1,19 @@
if (window.innerWidth <= 768) {
window.addEventListener('click', function (event) {
const navbarCollapse = document.getElementById('myNavbar');
if (!event.target.matches('.navbar-toggler')) {
navbarCollapse.classList.remove('in');
}
});
// Close navbar when scrolling
window.addEventListener('scroll', function () {
const navbarCollapse = document.getElementById('myNavbar');
navbarCollapse.classList.remove('in');
});
}