Toggle menu opens when clicking on a button

Hi There,

Here’s my website: http://www.alessandrorussino.com/ As you can see the toggle menu in the top left on the navigation bar screenshot here: http://prntscr.com/ilyejn I need that menu to toggled up/opens up by clicking on a button that I’ll create and placed on my web page.

Thanks

Hi There,

Thanks for writing in!

This is some thing you need to do with custom coding. We are really sorry but this is out of our theme support scope.

Thanks for understanding!

Hi Basanta,

Thanks for your reply. Yeah i thought so, but what bring me here is a previous post that I have created for similar feature, where I asked for a solution to open up the toggle menu when I click on my website logo, and one of your support member gave me some JS code and that worked. So if it works by clicking on the logo in the header, then I thought it should also by a button.

Here’s a copy of the code that I got previously:
jQuery( document ).on(‘click’, ‘a.hm5.x-image’, function (e) { e.preventDefault(); jQuery(’#menu-anchor-toggle’).trigger(‘click’); } );

Please let me know what you think.

Hi there,

The question is what button? But regardless, you can simply add your button and add an ID or Class to it. Let’s say you added an ID to your button of this-trigger-it, the code will be as simple as

jQuery( document ).on('click', '#this-trigger-it', function (e) { e.preventDefault(); jQuery('#menu-anchor-toggle').trigger('click'); } );

Hope this helps.

Hi,

Thanks for your detail reply and it works when I use the “Classic Button” but can’t figure out how to use or where to put the “ID” when I use just the “Button” from elements in “Pro” please check the screenshot: http://prntscr.com/im8pfr

Can you please help me where to put the ID as shown on the screenshot?

Thanks again.

Hi there,

At the top of the options click on the Customize tab, that will ring a new set of options that the ID is one of them:

You will need to scroll horizontally while your mouse is in the tabs section of the button options to see the Customize option.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.