jQuery Tutorial
jQuery outerHeight() Method With Syntax and Example
Understanding outerHeight method in jQuery
The outerHeight()
method returns the FIRST matched element's outer height.
This method includes padding and border, as shown in the image below.
Use outerHeight to include the margin (actual).
Syntax of outerHeight method in jQuery
$(selector).outerHeight(includeMargin)
Example of jQuery outerHeight method
The outer height of a
element is returned:
$("button").click(function(){
alert($("div").o<uterHeight());
});