"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"gulp": "gulp"
},
const nav = document.querySelector('nav');
const container = document.querySelector('.container')
const links = document.querySelectorAll('.down');
const handleLink = (e) => {
e.preventDefault();
container.insertAdjacentHTML("beforeend", e.target.nextElementSibling.innerHTML);
}
links.forEach(item => item.addEventListener('click', handleLink))
const nav = document.querySelector('nav');
const container = document.querySelector('.container') // container - это div, в который мы будем добавлять все submenu
const subMenuLists = nav.querySelectorAll(".submenu");
subMenuLists.forEach(item => container.insertAdjacentElement("beforeend", item))
const sliderItems = document.querySelectorAll(".slider__item");
const removeClasses = (slide) => {
sliderItems.forEach((item) => {
item == slide ? null : item.classList.remove("opened");
});
}
sliderItems.forEach((item) => {
item.addEventListener("click", (event) => {
const currentItem = event.target.closest(".slider__item")
currentItem.classList.toggle("opened");
removeClasses(currentItem);
});
});
if (salaryYear.value >= 200000) {
infoText.innerHTML = "текст";
} else if (salaryYear.value < 200000) {
infoText.innerHTML = "текст2";
}