EduardET

Untitled

Mar 7th, 2018
110
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.             }
  17.         }
  18.         setHeight( productImage );
  19.         $( '.et_pb_tabs_controls li a' ).each( function() {
  20.             $( this ).click( function() {
  21.  
  22.                 setTimeout( function() {
  23.                     setHeight( productImage );
  24.                 }, 600 )
  25.             } )
  26.         } )
  27.  
  28.     } );
  29. } )( jQuery );
  30. </script>
Advertisement
Add Comment
Please, Sign In to add comment