EduardET

JS :: Same product Height

Dec 21st, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. ( function( $ ) {
  3.     $( document ).ready( function() {
  4.         function equalHeight( el ) {
  5.             var maxHeight = 0;
  6.             el.each( function() {
  7.                 if ( $( this ).height() > maxHeight ) {
  8.                     maxHeight = $( this ).height();
  9.                 }
  10.             } );
  11.             el.css( 'min-height', maxHeight );
  12.         }
  13.         equalHeight( $( '.products .product .et_shop_image' ) );
  14.     } );
  15. } )( jQuery );
  16. </script>
Advertisement
Add Comment
Please, Sign In to add comment