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+ 7 */ 8 9( function($) { 10 11 $( 'html' ).addClass( 'js' ); 12 13 /** 14 * Toggle the off-screen menu. 15 * 16 * @since 1.0.0 17 */ 18 function toggleMenu() { 19 $( 'body' ).toggleClass( 'no-scroll' ); 20 $( '.off-screen-menu' ).fadeToggle(); 21 } 22 23 /** 24 * Close the off-screen menu at mobile screen widths. 25 * 26 * Useful during browser resize. 27 * 28 * @since 1.0.0 29 */ 30 function closeMenuIfMobile() { 31 var isMobile = $( '.menu-toggle' ).css( 'display' ) === 'block'; 32 var menuOpen = $( 'body' ).hasClass( 'no-scroll' ); 33 if (isMobile && menuOpen) { 34 toggleMenu(); 35 } 36 } 37 38 $( function() { 39 $( '.toggle-off-screen-menu-area' ).click( toggleMenu ); 40 $( window ).resize( closeMenuIfMobile ); 41 }); 42 43 // Add Keyboard Accessibility. 44 $( function() { 45 46 $( '.after-content-featured .entry *' ) 47 .focus( function() { 48 $(this).closest( '.entry' ).addClass( 'focused' ); 49 }) 50 .blur( function() { 51 $(this).closest( '.entry' ).removeClass( 'focused' ); 52 }); 53 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.