Add & remove CSS Classes and Data Attribute to any Bubble element.
----
ClassFlex reads JSON commands from the id attribute of your Bubble.io elements. There are four commands available: addClass, removeClass, addData, removeData. You can add these commands to the id attribute of your elements to apply changes.
Here's how to add commands:
Navigate to your Bubble.io application editor. Select the element you wish to modify. In the "Element inspector" panel on the left, find the "ID Attribute" field. Add your JSON command to the ID Attribute field.
EXAMPLES:
Adding a Class: To add a class named myClass to an element with ID elementID, use: elementID {"addClass":"myClass"}.
Removing a Class: To remove a class named myClass from an element with ID elementID, use: elementID {"removeClass":"myClass"}.
Adding a Data Attribute: To add a data attribute named myAttribute with a value of myValue to an element with ID elementID, use: elementID {"addData":{"myAttribute": "myValue"}}.
Removing a Data Attribute: To remove a data attribute named myAttribute from an element with ID elementID, use: elementID {"removeData":"myAttribute"}.
Chaining Multiple Commands: To add a class and a data attribute at the same time to an element with ID elementID, use: elementID [{"addClass":"myClass"},{"addData":{"myAttribute": "myValue"}}].
Free
For everyone
stars • 0 ratings
92 installs
This plugin does not collect or track your personal data.