"Button" that triggers another trigger

Hi creative people,

I have this supposedly simple problem.

I have a “contact” button inside a drop down menu navigation that links to a section of the page. What I want it to do is when the “contact” button clicked/tapped, it triggers the same action as the “x” button that closes the menu, then goes to the linked section.

Can anyone help me?

Thank you.