jQuery Plugin To Equalize Height Based On Highest Or Lowest Element - sameheight

File Size: 4.58 KB
Views Total: 658
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin To Equalize Height Based On Highest Or Lowest Element - sameheight

sameheight is a lightweight and responsive jQuery equal height plugin which makes all the columns on the same row have the same height. The difference to other equal height plugins is that the sameheight plugin has the ability to equalize the height of all matching elements based on the lowest one.

How to use it:

1. Add the latest version of jQuery library and the jQuery sameHeight plugin to the webpage.

<script src="//code.jquery.com/jquery-3.0.0.min.js"></script>
<script src="sameHeight.js"></script>

2. The JavaScript to make all elements ('.child') within the container ('parent') have the same height based on the highest element.

$(".parent").find(".child").sameHeight();

3. The JavaScript to make all elements ('.child') within the container ('parent') have the same height based on the lowest element. In this case, the overflowing content will be collapsed into a scrollable area when the plugin is active.

$(".parent").find(".child").sameHeight({
  way: "min"
});

This awesome jQuery plugin is developed by HelloLinkon. For more Advanced Usages, please check the demo page or visit the official website.