Gets the height of hidden objects by temporarily revealing them and processing.
Parameters:
Name | Type | Description |
---|---|---|
el | HTMLElement | The hidden element to get height for. |
- Since
- 1.0.0
- Source
Returns:
The height in pixels as number for the hidden element.
- Type:
- number
Example
import { getHiddenHeight } from "@gravityforms/utils";
function Example() {
const node = document.getElementById( 'hidden-example' );
const height = getHiddenHeight( node );
}