const filter__new = document.querySelector('.filter__new');
const filter__chp = document.querySelector('.filter__chp');
const filter__exp = document.querySelector('.filter__exp');
const filter__may = document.querySelector('.filter__may');

const sidebar__menu = document.querySelector('.sidebar__menu');
const m__filterbtn = document.querySelector('.m__filterbtn');
const m__black = document.querySelector('.m__filterbtn_black');


if($('#userSkTy').val() != "") {
    $("#skTyCusList").css("display", "");
    $("#skTyAllList").hide();
    $("#skTyAllList").css("margin-left", "20px");
} else {
    $("#skTyCusList").css("display", "none");
    $("#skTyAllList").show();
}

m__filterbtn.addEventListener('click', () => {
    sidebar__menu.classList.toggle('active');
    m__black.classList.toggle('active');
});

filter__new.addEventListener('click', () => {
    filter__new.classList.add('active');
    filter__chp.classList.remove('active');
    filter__exp.classList.remove('active');
    filter__may.classList.remove('active');
});
filter__chp.addEventListener('click', () => {
    filter__new.classList.remove('active');
    filter__chp.classList.add('active');
    filter__exp.classList.remove('active');
    filter__may.classList.remove('active');
});
filter__exp.addEventListener('click', () => {
    filter__new.classList.remove('active');
    filter__chp.classList.remove('active');
    filter__exp.classList.add('active');
    filter__may.classList.remove('active');
});
filter__may.addEventListener('click', () => {
    filter__new.classList.remove('active');
    filter__chp.classList.remove('active');
    filter__exp.classList.remove('active');
    filter__may.classList.add('active');
});

m__black.addEventListener('click', () => {
    if (m__black.classList.contains('active')) {
        m__black.classList.toggle('active');
    }
    if (sidebar__menu.classList.contains('active')) {
        sidebar__menu.classList.toggle('active');
    }
});