side-panel-left-overlay.html - Open from code

1 reply·opened May 17, 2023
E
Emma WilsonMay 17, 2023

<a href="#" class="button button-xlarge button-rounded side-panel-trigger bottommargin">Open Side Panel</a>

I undertand that is possible to open the side from an element with the class "side-panel-trigger".

Is there any way to open the side panels from js code?

S
SemiColonWebSTAFFMay 18, 2023

Hello,

Absolutely! Consider using this code to Open the Side Panel:

document.body.classList.add('side-panel-open');

and this to close the Side Panel:

document.body.classList.remove('side-panel-open');

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard