Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #720244

    I can’t seem to figure out how to get the 2nd level menu item to maintain the hover background color when I move the mouse over a 3rd level item. As it is now, the text remains the same color as the hover style but the 2nd level menu item loses the background color. See the link in private content.

    Any suggestions?

    Thanks!

    #721359

    Hey Kevin!

    Thank you for using Enfold.

    Please add this in the functions.php file.

    
    function add_custom_script(){
    ?>
    <script type="text/javascript">
    (function($){
    	function a() {
    		$('.main_menu .menu .sub-menu .sub-menu').on({
    			mouseenter: function () {
    				$(this).parent('.menu-item-has-children').find('> a').css('background-color', '#f57535');
    			},
    	
    			mouseleave: function () {
    				$(this).parent('.menu-item-has-children').find('> a').css('background-color', '');
    			}
    		});
    	}
    	
    	a();
    })(jQuery);
    </script>
    <?php 
    }
    add_action('wp_footer', 'add_custom_script');

    Regards,
    Ismael

    #721564

    Looks like that solved the issue. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Menu item color of 2nd level when hovering over 3rd level’ is closed to new replies.