Determine if an element is visible in the dom.
Parameters:
Name | Type | Description |
---|---|---|
elem | HTMLElement | The element to check for visibility. |
- Since
- 1.0.0
- Source
Returns:
Whether or not the element is visible.
- Type:
- boolean
Example
import { getNodes, visible } from "@gravityforms/utils";
function Example() {
const target = getNodes( 'example' )[ 0 ];
if ( visible( target ) ) {
// do something
}
}