Snippet: Display Menu Search Dropdown on Hover
add_action( 'wp_footer', function() { ?>
( function( $ ) {
'use strict';
$( '.search-toggle-li' ).hover( function() {
$( this ).toggleClass( 'active' );
$( '#searchform-dropdown' ).toggleClass( 'show' );
} );
} ) ( jQuery );
<?php } );
All PHP snippets should be added via child theme's functions.php file or via a plugin.
We recommend Code Snippets (100% Free) or WPCode (sponsored)
We recommend Code Snippets (100% Free) or WPCode (sponsored)