Remove Class from Element Action
Functionality
The Remove Class Action is used to dynamically remove one or more CSS classes from an HTML element with a specified ID. This action allows you to revert any styling or behavior changes previously applied by those CSS classes. By removing a class, you can undo the modifications made to the element's appearance, such as removing borders, text transformations, or animations. Similar to the Add Class action, this can be used with multiple classes at once, separated by commas, for more complex changes. It can be applied to any HTML element, such as buttons, links, divs, text fields, images, and more.
Steps
Here are the steps to follow in order to use the Remove Class from Element action:
Search for "Remove Class" in the Actions section.
Select the action with your element ID from the available options.
Click on the Action to open the editor.
Enter one or more CSS class names, separated by commas, in the "Classes to Remove" field to undo the appearance or behavior modifications applied to the element.
For Example
In this example, clicking the "Remove Style" button triggers the Remove Class action, which removes the changeExample class (a predefined class) from the example div. Before the action is applied, the div has the changeExample class, which centers the text, changes the font, and adds a border. Once the class is removed, the div reverts to its default appearance. Click the "Remove Style" button to observe the styling revert to its original state.
Last updated