hankknight
asked on
jQuery: Tallest paragraph
Using jQuery, how can I find the height of the tallest matching paragraph?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Demo</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
alert('The tallest paragraph inside div.xyz is ???? pixels high.');
});
</script>
<style type="text/css">
p {
width: 100px;
border: 1px solid red;
padding: 10px;
margin: 10px auto;
}
</style>
</head>
<body>
<div class="xyz">
<p>a</p>
<p>abc</p>
<p>gfhreer kjewhq kjeqwh kjeqwh kqewh ejkwq heqwkj eqwh keqwh jkheqwjk heqwkjeqwhkew jkeqwh kjeqw kjeqwr qwer</p>
<p>dfadsfadsfds asd ads jdsakl jdskl jasdlkjasdfkas adfsc</p>
</div>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.