I'm working with a table built solely with CSS classes. (I understand that using html table tags is often okay for tabular data, but the boss expressed a preference for CSS.) This isn't the code, but it's put together basically like this:
<div class="row">
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
</div>
<div class="row">
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
</div>
I'm working towards a script in JS (making use of jQuery) that will compare the height of each cell in the row and set all cells' height to the maximum found in their row. I tried using display: table-row
and the like instead, but it yielded funky results.
I'd like to do this with a simple loop. I know how I'd do it if each row were a different class (.hasClass()
) but I do not know how to only iterate over one in that class at a time. I tried documentation and a number of web searches before turning to StackOverflow. I found a similar question (Selecting only one div of entire css class in jQuery) but could not see how that solution applied to my problem. I'm new to these technologies, so please, keep it simple for me, and forgive me if the answer is terribly obvious.