forked from LiveCarta/LiveCartaWP
@@ -44,24 +44,6 @@ window.addEventListener('DOMContentLoaded', function(){
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
addNext();
|
addNext();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
function promoTopNext(){
|
|
||||||
if (document.querySelectorAll('.promo-backs').length){
|
|
||||||
setTimeout(function(){
|
|
||||||
let currents = document.querySelectorAll('.promo-bg.current');
|
|
||||||
currents.forEach(item => {
|
|
||||||
item.classList.remove('current');
|
|
||||||
if (item.nextElementSibling){
|
|
||||||
item.nextElementSibling.classList.add('current');
|
|
||||||
} else {
|
|
||||||
item.closest('.promo-backs').find('.promo-bg:first-child').classList.add('current');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
promoTopNext();
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
promoTopNext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.document.querySelector('.promo-top')) {
|
if (this.document.querySelector('.promo-top')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user