|
Server : LiteSpeed System : Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64 User : gazetufm ( 1431) PHP Version : 8.1.35 Disable Function : NONE Directory : /home2/gazetufm/www/wp/wp-content/plugins/wp-statistics/assets/dev/javascript/components/ | |
|
Path: //home2/gazetufm/www/wp/wp-content/plugins/wp-statistics/assets/dev/javascript/components/header.js
Size: 1.13 KB
Permissions: 0644
jQuery(document).ready(function () {
const dropdownToggles = document.querySelectorAll('.wps-admin-header__link--has-dropdown');
dropdownToggles.forEach(function (toggle) {
toggle.addEventListener('click', function (e) {
e.preventDefault();
const dropdownMenu = this.nextElementSibling;
if (dropdownMenu) {
dropdownMenu.classList.toggle('is-open');
toggle.classList.toggle('is-open');
}
});
});
document.addEventListener('click', function (e) {
dropdownToggles.forEach(function (toggle) {
const dropdownMenu = toggle.nextElementSibling;
if (dropdownMenu && !toggle.contains(e.target) && !dropdownMenu.contains(e.target)) {
dropdownMenu.classList.remove('is-open');
}
});
});
const targetElement = document.querySelector('.wp-header-end');
const noticeElement = document.querySelector('.notice.notice-warning.update-nag');
if (targetElement && noticeElement) {
targetElement.parentNode.insertBefore(noticeElement, targetElement.nextSibling);
}
});