| Server IP : 81.2.241.106 / Your IP : 216.73.216.165 Web Server : Apache/2.4.67 (Debian) System : Linux tranq-f.bakta.org 5.10.0-45-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64 User : lisky ( 1002) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/lisky/wp-content/themes/hitmag/js/ |
Upload File : |
/**
* File navigation.js.
*
* Handles toggling the navigation menu for small screens and enables TAB key
* navigation support for dropdown menus.
*/
// polyfill forEach
// https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach#Polyfill
if ( window.NodeList && ! NodeList.prototype.forEach ) {
NodeList.prototype.forEach = function( callback, thisArg ) {
var i;
var len = this.length;
thisArg = thisArg || window;
for ( i = 0; i < len; i++ ) {
callback.call( thisArg, this[ i ], i, this );
}
};
}
( function() {
const navigationIds = ['site-navigation', 'top-navigation'];
navigationIds.forEach(initNavigation);
function initNavigation(navigationId) {
const siteNavigation = document.getElementById(navigationId);
// Return early if the navigation doesn't exist.
if ( ! siteNavigation ) {
return;
}
const menu = siteNavigation.getElementsByTagName( 'ul' )[ 0 ];
// If menu is empty return early.
if ( 'undefined' === typeof menu ) {
return;
}
if ( ! menu.classList.contains( 'nav-menu' ) ) {
menu.classList.add( 'nav-menu' );
}
// Get all the link elements within the menu.
const links = menu.getElementsByTagName( 'a' );
// Toggle focus each time a menu link is focused or blurred.
for ( const link of links ) {
link.addEventListener( 'focus', toggleFocus, true );
link.addEventListener( 'blur', toggleFocus, true );
}
/**
* Sets or removes .focus class on an element.
*/
function toggleFocus(event) {
if ( event.type === 'focus' || event.type === 'blur' ) {
let self = this;
// Move up through the ancestors of the current link until we hit .nav-menu.
while ( ! self.classList.contains( 'nav-menu' ) ) {
// On li elements toggle the class .focus.
if ( 'li' === self.tagName.toLowerCase() ) {
self.classList.toggle( 'focus' );
}
self = self.parentNode;
}
}
}
}
}() );
jQuery(document).ready(function(){
var mobMainNav = jQuery('.responsive-mainnav'),
mainNavUl = mobMainNav.find('ul#primary-menu'),
mNavWrapper = jQuery('<div class="hm-nwrap"></div>');
mNavWrapper.appendTo(mobMainNav);
jQuery('#site-navigation ul:first-child').clone().appendTo(mNavWrapper);
jQuery('#main-nav-button').on( "click", function(event){
event.preventDefault();
mobMainNav.slideToggle(0);
mainNavUl.show();
});
});
jQuery(document).ready(function(){
var mobTopNav = jQuery('.responsive-topnav'),
topNavUl = mobTopNav.find('ul#top-menu'),
tNavWrapper = jQuery('<div class="hm-nwrap"></div>');
tNavWrapper.appendTo(mobTopNav);
jQuery('#top-navigation ul:first-child').clone().appendTo(tNavWrapper);
jQuery('#top-nav-button').on( "click", function(event){
event.preventDefault();
mobTopNav.slideToggle(0);
topNavUl.show();
});
});