class GeoIp
{
private \SxGeo $sxGeo;
public function __construct()
{
$this->sxGeo = new \SxGeo(Storage::disk('local')->path('sxgeo/SxGeo.dat'));
}
public function getDetectedCountry($ip = null)
{
if (!$ip) {
$ip = real_ip();
}
$countryCode = strtolower($this->sxGeo->getCountry($ip)) ?: 'ru';
return Country::find($countryCode);
}
}
let accordionTriggers = document.querySelectorAll('.accordion-item__trigger');
accordionTriggers.forEach(trigger => item.addEventListener('click', () => {
const item = trigger.parentNode;
item.classList.toggle('accordion-item_active');
if(let icon = trigger.querySelector('.accordion-item__title-arrow-off')) {
icon.classList.remove('accordion-item__title-arrow-off')
}
});
if (n == num) {
clearInterval(interval);
}
l.innerHTML = n;
на if (n >= num) {
clearInterval(interval);
l.innerHTML = num;
return;
}
l.innerHTML = n;
<div class="container">
<nav>
<ul class="topmenu">
<li><a href="">Home</a></li>
<li><a href="">Shop</a></li>
<li><a href="" class="down">Blog</a>
<ul class="submenu">
<li><a href="">Category</a></li>
<li><a href="">Author</a></li>
<li><a href="">Archive</a></li>
<li><a href="">Tags</a></li>
</ul>
</li>
<li><a href="" class="down">Portfolio</a>
<ul class="submenu">
<li><a href="">Category</a></li>
<li><a href="">Author</a></li>
<li><a href="">Archive</a></li>
<li><a href="">Tags</a></li>
</ul>
</li>
<li><a href="">Contact</a></li>
</ul>
</nav>
</div>
const container = document.querySelector('.container');
container.insertAdjacentHTML('beforeend', `<div>ТУТ ВАШ СПИСОК</div>`)
const swiper = new Swiper(".main-slider", {
enabled: false,
breakpoints: {
1490: {
enabled: true,
slidesPerView: 1,
speed: 800,
},
},
});
const unwrap = (element) => {
element.replaceWith(...element.children);
};
unwrap(document.querySelector('.div'));
=COUNTIF(A1:A9;TRUE)