Expand/collapse navigation menu on click in Oracle APEX

As per APEX default feature a navigation menu redirects to a page. But if someone requires to only expand the parent menu without navigating to a page then that can be achieved by below steps.

Step 1:

Set parent menu target to blank. Go to

shared component -> navigation menu -> desktop navigation menu

Step 2:

  • Go to Page 0.
  • Click On dynamic actions.

  • Create DA(Dynamic Action) on page load event.

  • In True action select – Execute JavaScript Code.

  • Paste below code :

    $(‘#t_Body_nav #t_TreeNav li.a-TreeView-node–topLevel > div.a-TreeView-content:not(:has(a))’).click(function(){

        $(this).prev(‘span.a-TreeView-toggle’).click();

    });

Now, refresh your page to see the changes.

 

 

For any help, please reply here.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *