Snippets: Display Menu Search Dropdown on Hover

add_action( 'wp_footer', function() { ?>

	<script>
		( function( $ ) {
			'use strict';

				$( '.search-toggle-li' ).hover( function() {
					$( this ).toggleClass( 'active' );
					$( '#searchform-dropdown' ).toggleClass( 'show' );
				} );

		} ) ( jQuery );
	</script>

<?php } );

Snippet Type: PHP

Posted Under: Menu

All PHP snippets should be added via a child theme's functions.php file.