SlidebarMenu Click on page load using JS

Hi,
I want to create a workflow that will check if when the page is loaded and width is >xx to detect if desktop, then if so, I’ll need to load the page with the SlidebarMenu plugin is open.

I reckon we can do this with some Js code " run javascript plugin" but I’m not sure what is the correct code?

I’m using this plugin from Bubble:
https://manual.bubble.io/core-resources/bubble-made-plugins/slidebar-menu#slidebar-menu

Any help is really appreatied

This is super easy to do, and doesn’t require a workflow or any custom code.

In this case I’m showing a floating group when the page width is <1111 but you get the idea.

Step 1 - uncheck “this element is visible on page load”

Screen Shot 2022-05-09 at 12.18.57 am

Step 2 - set a conditional to show the element when the page width is >x px

Screen Shot 2022-05-09 at 12.19.07 am

Then whenever the screen width is >x that element will show


Josh @ Support Dept
Helping no-code founders get unstuck fast :rocket:save hours, & ship faster with an expert :man_technologist: on-demand

I post daily about no-code and Bubble on Twitter Follow Support Dept on Twitter

1 Like

Thanks for the help, but I’m not using any group, I’m using the Bubble plugin Slidebar Menu
which will only open if you click on it,
my goal is, this plugin on desktop it should be opened automatically

Ah, I see. It probably would be a snippet of custom JS in that case to set the state of the element to open.

I’m a bit of a minimalist when it comes to plugins and use them sparingly, so I can’t help you on that one sorry as I don’t have any projects to pull from.

However, that plugin is basically just a floating group with a custom state for open/closed. So it wouldn’t take long to just recreate it and then follow my instructions above.


Josh @ Support Dept
Helping no-code founders get unstuck fast :rocket:save hours, & ship faster with an expert :man_technologist: on-demand

I post daily about no-code and Bubble on Twitter Follow Support Dept on Twitter

1 Like