jquery-match-height icon indicating copy to clipboard operation
jquery-match-height copied to clipboard

Add priority sorting

Open liabru opened this issue 9 years ago • 0 comments

In complex cases it can be required to apply matchHeight to elements in a certain order e.g. #104 to get the right result.

It seems that selecting in a certain order won't help as selections are always DOM ordered. So you must make multiple selections, but this can still be tricky to guarantee the correct order.

A possible solution is to add a priority value to groups / elements and then sort $.fn.matchHeight._groups and the elements before applying.

Another solution is to apply matchHeights iteratively until no more elements change height (i.e. global solution found), but this might be slow or unstable.

liabru avatar Jan 29 '16 16:01 liabru