jQuery.hoverHeight is a plugin that shortens elements to a specified height and expands them on hover
Include it in your HTML after importing jQuery, like: <script type="text/JavaScript" src="./js/libs/jquery.hoverHeight.js" />
Use it like:
$(".my-class").hoverHeight(/*height*/);
You can pass in the height, either as a parameter or with the data-height attribute and can be in any format that jQuery accepts.