Show/Hidem Groups by Javascript from dynamic id_element

In my app, the navigation menu comes from a list of database modules. therefore. I need to open the Modolo Group Dynamically, which is not possible with Bubble. so I need to do this via Javascript by placing the element id. I already tried the codes below,

$ (’#Custon_item_Select’). Css ({display: ‘block’,visibility: ‘visible’}); //does not work…

$(’#Custon_item_Select’).show(); //does not work…

but they do not display a Group marked to be hidden when loading the Page. does anyone know which Javascript command I can use to show / hide groups?

The main question actually I have is why do you need to use JS for that? There’s nothing in your post that explain your case.

You can already show and hide group using native Bubble actions

The bubble actions use direct reference to objects. therefore, you cannot have a menu with a “GroupName” field and use the click event of this menu to display this Group.
because in the bubble event you have no way to place the Group you want to open / hide. it is not possible to choose the Group Name Dynamically.
Not to mention that being dynamic, a single action would be used by all menu items. passing the value of the name I want to display.

$("#elementid").css(“visibility”, “hidden”);

How did you create you menu? I guess that if you are using dynamic data, this mean you are using RG. You can have related element to your menu open using the current cell data.

But maybe if you share your DB setting and example, it will be easier to help you.

You can always use jquery or js like @Bubbleboy suggest, but depending on how you use your data, it may not work. Also, there’s a lot more thing surronding an element in Bubble that might explain this didn’t work.

For example, when we build a plugin, we need to provide the height of the element so Bubble can recalculate the page and adjust the page according to this element height.

This topic was automatically closed after 70 days. New replies are no longer allowed.