• I would like to add the possibility of dropdown menu on my WP website. I do not like that static links on page. I wish I could hover the mouse over a category and more links would appear. I searched on Google for some themes but the dropdown is too ugly.

    Does anyone have a nice one to show? It needs to use Jquery because I am already using it on my personal blog.

Viewing 1 replies (of 1 total)
  • I have a nice dropdown menu in the links of my site. Check out:

    https://www.sitepor500.com.br

    When you hover the mouse over the links on the horizontal menu you will see a dropdown menu exactly as you want.

    The JS code is bellow:

    $("div.menu_links_pai_esquerda").not("div.menu_selecionado").bind("mouseenter mouseleave",
    
            function(event) {
    
                if (event.type == "mouseenter") {
    
    				$(this).stop(true,false).animate(
    
    					{backgroundPosition: "0px -41px"},
    					300
    
    				);
    
    				$(this).find("div.menu_links_pai_direita").stop(true,false).animate(
    
    					{backgroundPosition: "right -41px"},
    					300
    
    				);
    
    				$(this).find("img").attr("src","imagens/seta_cima.png");
    				$(this).find("div.menu_links_menu_flutuante").stop(true,true).slideDown(200,"easeInCubic");
    
                }
                else if (event.type == "mouseleave") {
    
    				$(this).animate(
    
    					{backgroundPosition: "0px 0px"},
    					300
    
    				);
    
    				$(this).find("div.menu_links_pai_direita").animate(
    
    					{backgroundPosition: "right 0px"},
    					300
    
    				);
    
    				$(this).find("img").attr("src","imagens/seta_baixo.png");
    				$(this).find("div.menu_links_menu_flutuante").slideUp(400,"easeOutExpo");
    
                }
    
            }
    
        );
    
        $("div.menu_links_filho").not("div.sem_animacao").bind("mouseenter mouseleave",
    
            function(event) {
    
                if (event.type == "mouseenter") {
    
    				$(this).stop(true,false).animate(
    
    					{backgroundColor:"#FFFFFF", color:"#000000"},
    					50
    
    				);
    
                }
                else if (event.type == "mouseleave") {
    
    				$(this).animate(
    
    					{backgroundColor:"#151516", color:"#FFFFFF"},
    					500,
    					function() {
    
    						$(this).css("background-color","");
    
    					}
    
    				);
    
                }
    
            }
    
        );

    Hope it helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Create website with dropdown menu with jQuery’ is closed to new replies.