EduardET

blog gird same title height

Jan 17th, 2018
130
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 setHeight( el ) {
  5.             var maxHeight = 0;
  6.             if ( el.length ) {
  7.                 el.each( function() {
  8.                     if ( $( this ).outerHeight() > maxHeight ) {
  9.                         maxHeight = $( this ).outerHeight();
  10.                     }
  11.                 } );
  12.  
  13.                 el.css( 'min-height', maxHeight );
  14.             }
  15.         }
  16.         setHeight( $( $( ".et_pb_blog_grid .et_pb_post .entry-title" ) ) );
  17.     } );
  18. } )( jQuery );
  19. </script>
Advertisement
Add Comment
Please, Sign In to add comment