Hello:
I've seen examples where adding the side-panel-trigger class to a button can open | close the Side Panel, if I strictly need it to be through a JQuery or Javascript script, how could I do it?
Regards
Pavel
Hello:
I've seen examples where adding the side-panel-trigger class to a button can open | close the Side Panel, if I strictly need it to be through a JQuery or Javascript script, how could I do it?
Regards
Pavel
Hello,
Thanks for your Patience!
For the jQuery Code, you can use the following code:
jQuery('body').toggleClass("side-panel-open");To just Open:
jQuery('body').toggleClass("side-panel-open", true);To just Close:
jQuery('body').toggleClass("side-panel-open", false);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.
Thank you very much. One additional question, the Side Panel automatically closes when you press on either side of the screen. How to avoid this behavior so that it is only closed by pressing a button located inside the Side Panel itself?
Regards
Pavel
Hello,
Find and delete the following line of code in the js/functions.js File:
if (!$(event.target).closest('#side-panel').length) { $body.toggleClass('side-panel-open', false); }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