Access/modify custom states via JavaScript

Hi! If I have an element (with an ID) in my page that has custom states, how can I access them from the browser -via JavaScript- to modify their values? In other words, how should I see the custom states in the DOM? :slight_smile: Thanks!

1 Like

I’m not sure that this is actually possible in vanilla Bubble.

The equivalent solution to what you want to do is to install Toolbox plugin. The JavaScript to Bubble Element there is essentially a JS-accessible custom state. The Run JavaScript action you get from Toolbox can be used to set its value. Similarly the Expression element found there is an element that holds the value of a dynamically updated JS function.

Short intro:

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