EduardET

set the same height pt

Jan 18th, 2018
133
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 pt = $( '.et_pb_pricing.wpc-pt' ),
  5.             heading = pt.find('.et_pb_pricing_heading');
  6.  
  7.         function setHeight( el ) {
  8.             var maxHeight = 0;
  9.             if ( el.length ) {
  10.                 el.each( function() {
  11.                     if ( $( this ).outerHeight() > maxHeight ) {
  12.                         maxHeight = $( this ).outerHeight();
  13.                     }
  14.                 } );
  15.  
  16.                 el.css( 'min-height', maxHeight );
  17.             }
  18.         }
  19.         pt.each(function(){
  20.             var heading = $(this).find('.et_pb_pricing_heading'),
  21.                 content = $(this).find('.et_pb_pricing_content'),
  22.                 pricing = $(this).find('.et_pb_pricing_content_top');
  23.             setHeight(heading);
  24.             setHeight(pricing);
  25.             setHeight(content);
  26.         })
  27.     } );
  28. } )( jQuery );
  29. </script>
Advertisement
Add Comment
Please, Sign In to add comment