EduardET

Untitled

Mar 2nd, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. ( function( $ ) {
  3.     $( document ).ready( function() {
  4.         var productImage = $( '.et_pb_tab_content .et_portfolio_image .et_pb_gallery_caption' );
  5.  
  6.         function setHeight( el ) {
  7.             var maxHeight = 0;
  8.             if ( el.length ) {
  9.                 el.each( function() {
  10.                     if ( $( this ).outerHeight() > maxHeight ) {
  11.                         maxHeight = $( this ).outerHeight();
  12.                     }
  13.                 } );
  14.  
  15.                 el.css( 'min-height', maxHeight );
  16.                 console.log(maxHeight)
  17.             }
  18.         }
  19.         setHeight(productImage);
  20.     } );
  21. } )( jQuery );
  22. </script>
Advertisement
Add Comment
Please, Sign In to add comment