Is there a way to set the height of an h3 element based on the tallest version of its siblings, but only for certain elements?
I have a list where CSS organizes items into rows of 3. The last li element in each row has the class "endRow". I want to find these "endRow" elements, then use jQuery's each() function to go back two elements and compare the heights of the h3 elements. Can anyone suggest a relatively simple approach to achieve this?
Thanks!
Update Here is a sample of the HTML markup. The goal is to make the h3 elements within each row equal in height.
<ul>
<li>
<a href="#"><img src="images/x.jpg" alt=""></a>
<h3><a href="#">Item 1</a></h3>
<div class="productOptions">
<p>Info</p>
<p>More info</p>
<p>Even more info</p>
</div>
</li>
<li>
<a href="#"><img src="images/x.jpg" alt=""></a>
<h3><a href="#">Item 2</a></h3>
<div class="productOptions">
<p>Info</p>
<p>More info</p>
<p>Even more info</p>
</div>
</li>
<li class="endrow">
<a href="#"><img src="images/x.jpg" alt=""></a>
<h3><a href="#">Item 3</a></h3>
<div class="productOptions">
<p>Info</p>
<p>More info</p>
<p>Even more info</p>
</div>
</li>
<li>
<a href="#"><img src="images/x.jpg" alt=""></a>
<h3><a href="#">Item 1</a></h3>
<div class="productOptions">
<p>Info</p>
<p>More info</p>
<p>Even more info</p>
</div>
</li>
<li>
<a href="#"><img src="images/x.jpg" alt=""></a>
<h3><a href="#">Item 1</a></h3>
<div class="productOptions">
<p>Info</p>
<p>More info</p>
<p>Even more info</p>
</div>
</li>
<li class="endrow">
<a href="#"><img src="images/x.jpg" alt=""></a>
<h3><a href="#">Item 1</a></h3>
<div class="productOptions">
<p>Info</p>
<p>More info</p>
<p>Even more info</p>
</div>
</li>