Last active
February 6, 2018 18:45
-
-
Save skillmatic-co/336dc7ac85c87a95c6e0f34d31934e02 to your computer and use it in GitHub Desktop.
jQuery MatchHeight by specific target in each row
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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