diff options
author | Stefano Zoffoli <stefano.zoffoli@librasoftsnc.it> | 2014-08-06 11:52:23 +0200 |
---|---|---|
committer | Stefano Zoffoli <stefano.zoffoli@librasoftsnc.it> | 2014-08-06 11:52:23 +0200 |
commit | 816850df8b5d9c7047258fb5812b03e5df7806fc (patch) | |
tree | e1c22aa436959739244ff4815ba3374bd10c2d46 | |
parent | b3df801b4144b295ee4eeb42ae10c45dc5b958d6 (diff) | |
download | jquery-match-height-816850df8b5d9c7047258fb5812b03e5df7806fc.zip jquery-match-height-816850df8b5d9c7047258fb5812b03e5df7806fc.tar.gz jquery-match-height-816850df8b5d9c7047258fb5812b03e5df7806fc.tar.bz2 |
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.
-rw-r--r-- | jquery.matchHeight.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jquery.matchHeight.js b/jquery.matchHeight.js index 713f70f..f0bbeb8 100644 --- a/jquery.matchHeight.js +++ b/jquery.matchHeight.js @@ -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 { @@ -237,4 +237,4 @@ return parseFloat(value) || 0; }; -})(jQuery);
\ No newline at end of file +})(jQuery); |