In order to better control the elements to meet our requirements, we can get the height and width of this part through outerHeight(options) and outerWidth(options).
outerHeight(options)
Get the outer height of the first matching element (default includes padding and border).
This method works for both visible and hidden elements.
Return value: Integer
Parameters:
options(Boolean): (false) When set to true, margins are included in the calculation.
Example:
Get the outer height of the first paragraph.
HTML code:
Hello
2nd Paragraph
Hello
outerHeight: 35, outerHeight(true):55
Hello
2nd Paragraph
Hello
outerWidth: 65 , outerWidth(true):85