composer create-project laravel/laravel example-app
btn.forEach((key, index) => {
})
// Это коллекции - множественная форма
let buttons = document.querySelectorAll('.advertisement-tabs__item'); //Кнопки табой
let blocks = document.querySelectorAll('.advertisement-tabs__content') //Контент
// Что еще за key? Там кнопка
buttons.forEach((btn, index) => {
btn.addEventListener('click', function() {
console.dir(btn)
blocks.forEach(block => {
block.classList.toggle('active', btn === block)
})
})
})
(function () {
const square = document.querySelector('.skill__skills');
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
const entrySquares = entry.target.querySelectorAll('.loading');
if (typeof getCurrentAnimationPreference === 'function' && !getCurrentAnimationPreference()) {
return;
}
entrySquares.forEach(entrySquare => {
if (entry.isIntersecting) {
entrySquare.classList.add('square-animation');
return;
}
entrySquare.classList.remove('square-animation');
})
});
});
observer.observe(square);
})();
if ($src) {
echo '<img src="'.$src.'">';
}
img[src=""] {
display: none;
}
img:not([src]) {
display: none;
}