1/** 2 * This script adds the jquery effects to the Essence Pro Theme. 3 * 4 * @package Essence\JS 5 * @author StudioPress 6 * @license GPL-2.0-or-later 7 */ 8 9( function( $ ) { 10 $( 'html' ).addClass( 'js' ); 11 12 /** 13 * Toggle the off-screen menu. 14 * 15 * @since 1.0.0 16 */ 17 function toggleMenu() { 18 $( 'body' ).toggleClass( 'no-scroll' ); 19 $( '.off-screen-menu' ).fadeToggle(); 20 } 21 22 /** 23 * Close the off-screen menu at mobile screen widths. 24 * 25 * Useful during browser resize. 26 * 27 * @since 1.0.0 28 */ 29 function closeMenuIfMobile() { 30 var isMobile = 'block' === $( '.menu-toggle' ).css( 'display' ); 31 var menuOpen = $( 'body' ).hasClass( 'no-scroll' ); 32 if ( isMobile && menuOpen ) { 33 toggleMenu(); 34 } 35 } 36 37 $( function() { 38 $( '.toggle-off-screen-menu-area' ).click( toggleMenu ); 39 $( window ).resize( closeMenuIfMobile ); 40 }); 41 42 // Add Keyboard Accessibility. 43 $( function() { 44 $( '.after-content-featured .entry *' ) 45 .focus( function() { 46 $( this ) 47 .closest( '.entry' ) 48 .addClass( 'focused' ); 49 }) 50 .blur( function() { 51 $( this ) 52 .closest( '.entry' ) 53 .removeClass( 'focused' ); 54 }); 55 }); 56}( jQuery ) );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.