????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.14.134.62 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/www.astacus.eu/wp-content/themes/twentyseventeen/assets/js/ |
Upload File : |
/* global twentyseventeenScreenReaderText */ /** * Theme functions file. * * Contains handlers for navigation and widget area. */ (function( $ ) { var masthead, menuToggle, siteNavContain, siteNavigation; function initMainNavigation( container ) { // Add dropdown toggle that displays child menu items. var dropdownToggle = $( '<button />', { 'class': 'dropdown-toggle', 'aria-expanded': false }) .append( twentyseventeenScreenReaderText.icon ) .append( $( '<span />', { 'class': 'screen-reader-text', text: twentyseventeenScreenReaderText.expand }) ); container.find( '.menu-item-has-children > a, .page_item_has_children > a' ).after( dropdownToggle ); // Set the active submenu dropdown toggle button initial state. container.find( '.current-menu-ancestor > button' ) .addClass( 'toggled-on' ) .attr( 'aria-expanded', 'true' ) .find( '.screen-reader-text' ) .text( twentyseventeenScreenReaderText.collapse ); // Set the active submenu initial state. container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' ); container.find( '.dropdown-toggle' ).click( function( e ) { var _this = $( this ), screenReaderSpan = _this.find( '.screen-reader-text' ); e.preventDefault(); _this.toggleClass( 'toggled-on' ); _this.next( '.children, .sub-menu' ).toggleClass( 'toggled-on' ); _this.attr( 'aria-expanded', _this.attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' ); screenReaderSpan.text( screenReaderSpan.text() === twentyseventeenScreenReaderText.expand ? twentyseventeenScreenReaderText.collapse : twentyseventeenScreenReaderText.expand ); }); } initMainNavigation( $( '.main-navigation' ) ); masthead = $( '#masthead' ); menuToggle = masthead.find( '.menu-toggle' ); siteNavContain = masthead.find( '.main-navigation' ); siteNavigation = masthead.find( '.main-navigation > div > ul' ); // Enable menuToggle. (function() { // Return early if menuToggle is missing. if ( ! menuToggle.length ) { return; } // Add an initial value for the attribute. menuToggle.attr( 'aria-expanded', 'false' ); menuToggle.on( 'click.twentyseventeen', function() { siteNavContain.toggleClass( 'toggled-on' ); $( this ).attr( 'aria-expanded', siteNavContain.hasClass( 'toggled-on' ) ); }); })(); // Fix sub-menus for touch devices and better focus for hidden submenu items for accessibility. (function() { if ( ! siteNavigation.length || ! siteNavigation.children().length ) { return; } // Toggle `focus` class to allow submenu access on tablets. function toggleFocusClassTouchScreen() { if ( 'none' === $( '.menu-toggle' ).css( 'display' ) ) { $( document.body ).on( 'touchstart.twentyseventeen', function( e ) { if ( ! $( e.target ).closest( '.main-navigation li' ).length ) { $( '.main-navigation li' ).removeClass( 'focus' ); } }); siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ) .on( 'touchstart.twentyseventeen', function( e ) { var el = $( this ).parent( 'li' ); if ( ! el.hasClass( 'focus' ) ) { e.preventDefault(); el.toggleClass( 'focus' ); el.siblings( '.focus' ).removeClass( 'focus' ); } }); } else { siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ).unbind( 'touchstart.twentyseventeen' ); } } if ( 'ontouchstart' in window ) { $( window ).on( 'resize.twentyseventeen', toggleFocusClassTouchScreen ); toggleFocusClassTouchScreen(); } siteNavigation.find( 'a' ).on( 'focus.twentyseventeen blur.twentyseventeen', function() { $( this ).parents( '.menu-item, .page_item' ).toggleClass( 'focus' ); }); })(); })( jQuery );