Quantcast
Channel: Topic Tag: action | WordPress.org
Viewing all articles
Browse latest Browse all 889

D X on "Problem while adding an action to the navigation menu of Theme Twentyeleven"

$
0
0

Hi,
In the theme TwentyEleven, I want to add an action to the navigation menu. I wish the secondary menu to be displayed more slowly not suddenly as it is originally.

So I write some jQuery sentences :

$(document).ready(function(){
                  $("div.menu ul:first > li").mouseover(
                                        function(){
                                      $('ul',this).slideDown(400);
                                      }
                                        );
                  $("div.menu ul:first > li").mouseout(
                                            function(){
                                            $('ul',this).slideUp(200);
                                            }
                                            );
})(jQuery);

It does have a fonction on the navigation menu. However, it seems that the code that I add has a conflict with the original mechanism of displaying the secondary menu. Firstly the secondary menu will display very suddenly, after several tries, it gose as the way I want.

I try to find a solution in the nav-menu-template.php, but it's really too complicated for me to understand the code in this file.

So my question is that can anyone tell me :
Where can I find the original code which controls the way of the secondary menu being displayed in the theme TwentyEleven.


Viewing all articles
Browse latest Browse all 889

Trending Articles