Skip to content

Commit

Permalink
skip apply to rows with only one item
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Sep 10, 2014
1 parent cae21cd commit f72ab91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jquery.matchHeight.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@
var $row = $(row),
maxHeight = 0;

// skip apply to rows with only one item
if (byRow && $row.length <= 1)
return;

// ensure elements are visible to prevent 0 height
var hiddenParents = $row.parents().add($row).filter(':hidden');
hiddenParents.css({ 'display': 'block' });
Expand Down

0 comments on commit f72ab91

Please sign in to comment.