How to Use
The Hide Element brick can be used to hide (and optionally remove from the DOM) certain elements of the page.
After adding the Hide Element brick, use the selector input button or jQuery in the ‘selector’ input field to define which element to show.
This brick pairs well with the Show Element brick.
Use Cases
This brick is useful when:
- You want to hide some HTML element from the page
- You want to remove some HTML element from the page
The HTML can be from the original page, or maybe HTML that you’ve added to the page dynamically through another brick.
How to use it
To use this brick you can use a selector or pass it a variable whose value is a selector
- Selector:
Additionally you can specify a mode:
- Mode:
- Remove: This removes the element from the DOM
- Hide: This hides the element by applying a CSS style to it
Example
Video: Loom
Inputs
Name | Required | Type | Description |
---|---|---|---|
mode |
string
|
||
selector |
string
|
||
isRootAware |
boolean
|
Whether the brick should run in the context of the target element, or document |
Outputs
Name | Required | Type | Description |
---|---|---|---|
No outputs for this brick defined. |