תיאור:
מחזיר ערך גובה נוכחי עבור אלמנט ראשון מרשימת האלמנטים בהתאמה, מכיל padding ו- border.
אם includeMargin
לא צוין או
false, padding ו- border
כלולים בחישוב;
אם true, margin גם כלול.
שיטה לא מתאימה לאובייקטים
window ו- document;
עבורם תשתמשו ב-
.height().

דוגמה
מקבל ערך outerHeight של הפסקה.
var p = $("p:first");
$("p:last").text( "outerHeight:" + p.outerHeight() +
" , outerHeight(true):" + p.outerHeight(true) );
קוד מלא:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>p { margin:10px;padding:5px;border:2px solid #666; } </style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
var p = $("p:first");
$("p:last").text( "outerHeight:" + p.outerHeight() +
" , outerHeight(true):" + p.outerHeight(true) );
});
</script>
</head>
<body>
<p>Hello</p><p></p>
</body>
</html>
האם מידע זה היה מועיל?

