How to link a menu option with Content Area OFF Canvas

Hey everyone!

Someone can help me to link a menu option with a Content Area OFF Canvas.

I add the OFF Canvas button as seen: https://southlandservices.net/sandbox/delete

… but the idea is to have the OFF canvas show up when you click the Menu option Book.

I followed this instruction: https://theme.co/apex/forum/t/link-to-off-canvas-content/336/2

… but I quite did not understand.

Any Help will be very appreciated.

Best,
Robert

Hi there,

Thanks for writing in.

Please add this code to your global custom javascript.

jQuery(function($){
  $( document).on('click', '#menu-item-426.ubermenu-item > a', function(e) {
    e.preventDefault();
    $('.x-anchor-toggle').click();
  })
});

Thanks!

Thank you, Rad. It did the work. However, the menu option Book is useless when you click menu option Book in other pages such as Home! I thought the adding the code to my global custom javascript will affect the entire website also, once I remove the element Content area Off Canvas from the (page/delete > body) the menu option Book stop work. Matter fact I will not have the element (Content area Off Canvas) on any page but just the menu option Book calling the Content area Off Canvas.

Thank you again for your’all great support

Best,
Robert

Hey Robert

The above code will only open up the Content Area Off Canvas on a button click. if you need this functionality on every page, you’ll need to add the Content Area Off Canvas element on all pages.

The above code only helps to open up the menu by clicking on the Book menu item.

Hope this helps!

Guys. I need to figure out how to get this Content Area Off Canvas call by the menu item Book.

There is another user that did that: https://theme.co/apex/forum/t/link-to-off-canvas-content-ii/2204

His webpage is: https://irissymposium.be/home-pt/

The only difference is that he has a fix div. How can I get Content Area Off Canvas called by a menu item?

Please Advise!

Best,
Robert

@rcbarros
It was me who did http://irissymposium.be

How can I help?

Hey Robert,

Please keep in mind that the content area off canvas element has been added to this page only: https://southlandservices.net/sandbox/delete/

The content area off canvas element can only be access on that page. If you want to access it in all pages, you will have to edit all pages and add the element. Your issue can only be resolved if you are using Pro theme because in Pro theme, there is a custom header builder and that the header builder can make use of the Content Area Off Canvas element which can be accessible in all pages as long as the header is assign globally.

Best Regards.

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