mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
490 B
JavaScript
15 lines
490 B
JavaScript
5 months ago
|
const toggleSideMenu = function (e) {
|
||
|
e.preventDefault();
|
||
|
let txt = '<ul>';
|
||
|
document.querySelectorAll('#AplMenu > ul > li').forEach(function (el) {
|
||
|
if(!el.classList.contains('icon-menu')){
|
||
|
txt += el.outerHTML;
|
||
|
}
|
||
|
});
|
||
|
txt += '</ul>';
|
||
|
document.querySelector('#reps-menu').innerHTML = txt;
|
||
|
};
|
||
|
document.addEventListener('DOMContentLoaded',function () {
|
||
|
document.querySelector('#toggler-menu').addEventListener('click',toggleSideMenu);
|
||
|
});
|