Home > Web Front-end > JS Tutorial > Introduction to the use of Jquery's outerHeight method_jquery

Introduction to the use of Jquery's outerHeight method_jquery

WBOY
Release: 2016-05-16 17:22:52
Original
1091 people have browsed it

Gets the outer height of the first matching element (default includes padding and border).

This method works for both visible and hidden elements.

outerHeight(options)

optionsBoolean default value: 'false'

When set to true, the margins are included.

Description:
Get the outer height of the first paragraph.

HTML code:

Copy code The code is as follows:

Hello

2nd Paragraph



jQuery code:
Copy code The code is as follows:

var p = $("p:first");
$("p:last" ).text( "outerHeight:" p.outerHeight() " , outerHeight(true):" p.outerHeight(true) );

Result:
Copy code The code is as follows:

Hello

outerHeight: 35 , outerHeight(true):55


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template