MARKETPLACE
PLUGINS
BH - CSS CLASSES & DATA ATTRIBUTES
BH - CSS Classes & Data Attributes logo

BH - CSS Classes & Data Attributes

Published June 2023
   •    Updated this month

Plugin details

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
89 installs  
This plugin does not collect or track your personal data.

Other actions

Platform

Web

Contributor details

Balacode logo
Balacode
Joined 2015   •   24 Plugins
View contributor profile

Instructions

Types

This plugin can be found under the following types:

Categories

This plugin can be found under the following categories:

Resources

Support contact
Tutorial
Forum

Rating and reviews

No reviews yet

This plugin has not received any reviews.
Bubble