- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
jQuery innerHeight() with Examples
The innerHeight() method in jQuery is used to return the inner height. It includes padding, but border and margin are ignored.
Syntax
The syntax is as follows −
$(selector).innerHeight()
Example
Let us now see an example to implement the jQuery innerHeight() method−
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ document.getElementById("demo").innerHTML = "<br>Inner Height of DIV = " + $("div").innerHeight() }); }); </script> </head> <body> <h2>Demo Box</h2> <div style="height:150px;width:450px;padding:10px;margin:2px;background-color:green;"></div><br> <button>Inner Height of div</button> <p id="demo"></p> </body> </html>
Output
This will produce the following output−
Click the button to get Inner Height−
- Related Articles
- jQuery mousedown() with Examples
- jQuery mouseup() with Examples
- jQuery submit() with Examples
- jQuery resize() with Examples
- jQuery has() with Examples
- jQuery hasClass() with Examples
- jQuery mouseenter() with Examples
- jQuery mouseleave() with Examples
- jQuery mousemove() with Examples
- jQuery keypress() with Examples
- jQuery keyup() with Examples
- jQuery last() with Examples
- jQuery height() with Examples
- jQuery mouseout() with Examples
- jQuery mouseover() with Examples

Advertisements