Skip to content

Commit 816850d

Browse files
author
Stefano Zoffoli
committed
Fix usage of data-mh attribute
Before this fix, groups were miscalculated when using data-mh attribute instead of the more verbose data-match-height.
1 parent b3df801 commit 816850d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jquery.matchHeight.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
// generate groups by their groupId set by elements using data-match-height
136136
$('[data-match-height], [data-mh]').each(function() {
137137
var $this = $(this),
138-
groupId = $this.attr('data-match-height');
138+
groupId = $this.attr('data-match-height') || $this.attr('data-mh');
139139
if (groupId in groups) {
140140
groups[groupId] = groups[groupId].add($this);
141141
} else {
@@ -237,4 +237,4 @@
237237
return parseFloat(value) || 0;
238238
};
239239

240-
})(jQuery);
240+
})(jQuery);

0 commit comments

Comments
 (0)