.block {
padding: 2rem;
background: red;
&:hover & {
&__title {
display: none;
}
&__desc {
color:green;
}
}
}
const preloader = document.querySelector('.preloader');
const preloaderLogo = document.querySelector('.preloader .logo__src');
let preloaderIsDone = false;
const heroContent = document.querySelector('.hero__content');
window.addEventListener('load', () => {
setTimeout(() => {
if (preloader) {
const tl = gsap.timeline();
tl.to(preloader, {
yPercent: -100,
duration: 1,
ease: CustomEase.create('cubic', '0.96, 0.02, 0.34, 0.99'),
});
tl.to(
preloaderLogo,
{
duration: 1,
yPercent: -100,
},
'<'
);
tl.fromTo(
heroContent,
{
backgroundSize: '130%',
backgroundPosition: 'center center',
},
{
duration: 1,
backgroundSize: '100%',
},
'='
);
tl.then(() => {
preloaderIsDone = true;
});
} else {
preloaderIsDone = true;
}
}, 2000);
});
if(preloaderIsDone) {
alert('k')
}
Ну а если по сабжу, то https://wp-kama.ru/function/wp_get_nav_menu_items
должно подойти