How to Open The Drop Down Menu Using Mouse Over Instead of Mouse Click Event

Still need help?

The Atlassian Community is here for you.

Ask the community

This is not applicable in Confluence Administration page

If you wish to trigger the drop down menu without clicking it, you could do so by trying the following steps:

  1. Access Confluence Administration Page
  2. Navigate to Custom HTML
  3. Insert the following string to "At end of the HEAD" fields 

    <script>
    AJS.toInit(function(){
      AJS.$('.ajs-menu-bar > li.ajs-menu-item').hover(
        function(){ 
          AJS.$(this).children('a')[0].click();
        },
        function(){ 
          AJS.$(this).children('a')[0].click();
          AJS.$(this).removeClass('hover');
        } 
      );
    });
    </script>
  4. Save

Note : This above script is not applicable for Confluence running higher than v6.14 hence use the below script for higher versions:


<script>
AJS.toInit(function(){
  AJS.$('.aui-header-primary > .aui-nav > li:first, .aui-header-secondary > .aui-nav > li:nth-child(2), .aui-header-secondary > .aui-nav > li:nth-child(3), .aui-header-secondary > .aui-nav > li:nth-child(5)').hover(
    function(){ 
      AJS.$(this).children('.aui-dropdown2-trigger')[0].click();
    },
    function(){ 
      AJS.$(this).children('.aui-dropdown2-trigger')[0].click();
    } 
  );
});
</script>






Source : Answers thread Answered by David Simpson


Last modified on Jul 23, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.