jquery-match-height
jquery-match-height copied to clipboard
Nested element with data-mh
Hi, I have this html:
<div class="row">
<div class="col" data-mh="outer">
<h1 class="col-title" data-mh="col-title">Very very very very very long title</h1>
<div class="col-body">
Lorem ipsum dolor sit amet...
</div>
</div>
<div class="col" data-mh="outer">
<h1 class="col-title" data-mh="col-title">Short title</h1>
<div class="col-body">
Lorem ipsum dolor sit amet...
</div>
</div>
</div>
Is it possible to make the library update the height of children element (in this case data-mh="col-title") before the parent (data-mh="outer")?
Unfortunately you can't change the order using the data API. You should be able to do it instead by selecting the items in the order you need using jQuery and then using matchHeight.