Skip to content

Instantly share code, notes, and snippets.

@skillmatic-co
Last active February 6, 2018 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skillmatic-co/336dc7ac85c87a95c6e0f34d31934e02 to your computer and use it in GitHub Desktop.
Save skillmatic-co/336dc7ac85c87a95c6e0f34d31934e02 to your computer and use it in GitHub Desktop.
jQuery MatchHeight by specific target in each row
<script type="text/javascript">
var rows = $.fn.matchHeight._rows($('.row'));
$.each(rows, function(i, row) {
$matchTarget = row.closest('.wrap').find('.target');
row.matchHeight({
target: $matchTarget
});
});
</script>
<div class="wrap">
<div class="row">
Some Content
</div>
<div class="row target">
Some Other Content
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment