$(document).ready(function() {
$('.extraQuestionName li').each(function(i) {
$('.extraQuestionValue li').eq(i).height($(this).height());
});
});
The each()
function has an index parameter. This loops through the li
elements in the first list, and uses eq()
to find the item with the same index in the second list, then set the height.