Close "Content Area Off Canvas" programmatically

Here is my situation:

  1. I have a Content Area Off Canvas that opens in response to user click on its toggle.
  2. On this area, I have some text and another button. I would like to close the Content Area when this button is pressed.
  3. Can you give me some guidance on what approach should I take to accomplish this?

I have read this link and understand it. Basically, I need to do the reverse i.e. instead of opening, I need to close the Content Area.

Thanks.

Hi Misha,

The logic for closing the Off Canvas Content Area is the same as opening it. The code inside the link that you shared is basically forcing a click on the Content Area Toggle to open it up. It is a little bit counter-intuitive to do the same to close the Content Area.

The reason for that is that while the Content Area is opened it overlays the whole page and clicking any place of the overlay will close the Content Area. Now if you have a button inside the page, it will not be clickable as it will be under the overlay.

I tried to check the case but you have many licenses, and I am not sure which page you are talking about. Would you please give us the exact page URL and screenshot of the way you want the code work?

We will do our best to help you out for this customization. Needless to say that the customization request is outside of support scope and we will be able to give you proper pointers to achieve the customization, but the actual implementation is on your shoulders.

Thank you.

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