An HTML element can be hidden with the help of .hide() jQuery function or we can hide easily by making visibility equals hidden in CSS. We can easily find the height of this hidden element in jQuery.
There are two kinds of height that are defined with the every HTML element i.e, innerHeight and the outerHeight of the element:
- innerHeight: This height is considered when the width of the border is not considered for the selected element.
- outerHeight: This height is considered when the width of the border is considered for the selected element.
Example-1: This example show how to calculate innerHeight of the hidden element.
Here, border width will not be added to the result.
Example-2: This example show how to calculate outerHeight of the hidden element.
Here, border width will be added to the result.
- Difference between 'hidden' and 'aria-hidden' attributes in HTML
- How to get the width of hidden element in jQuery ?
- How to check if an element is hidden in jQuery?
- How to create hidden form element on the fly using jQuery ?
- jQuery | :hidden Selector
- How to detect value change on hidden input field in JQuery ?
- How to Display/Hide functions using aria-hidden attribute in jQuery ?
- How to select all visible or hidden elements in a HTML page using jQuery ?
- HTML width/height Attribute vs CSS width/height Property
- How to dynamically set the height and width of a div element using jQuery ?
- HTML | DOM Input Hidden value Property
- HTML | DOM Input Hidden type Property
- HTML | hidden Attribute
- HTML | DOM Input Hidden Object
- HTML | DOM Input Hidden form Property
- HTML | DOM Input Hidden name Property
- HTML <input type="hidden">
- HTML | DOM Input Hidden defaultValue Property
- What is the difference between visibility:hidden and display:none ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : shubham_singh