Skip to content

Commit

Permalink
Fix usage of data-mh attribute
Browse files Browse the repository at this point in the history
Before this fix, groups were miscalculated when using data-mh attribute instead of the more verbose data-match-height.
  • Loading branch information
Stefano Zoffoli committed Aug 6, 2014
1 parent b3df801 commit 816850d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.matchHeight.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
// generate groups by their groupId set by elements using data-match-height
$('[data-match-height], [data-mh]').each(function() {
var $this = $(this),
groupId = $this.attr('data-match-height');
groupId = $this.attr('data-match-height') || $this.attr('data-mh');
if (groupId in groups) {
groups[groupId] = groups[groupId].add($this);
} else {
Expand Down Expand Up @@ -237,4 +237,4 @@
return parseFloat(value) || 0;
};

})(jQuery);
})(jQuery);

0 comments on commit 816850d

Please sign in to comment.