EduardET

Untitled

Mar 30th, 2018
248
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 galleryItem = $( '#nocontentblog article .entry-title' );
  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( galleryItem );
  19.         $( document ).ajaxSuccess( function() {
  20.             setHeight( galleryItem );
  21.         } );
  22.     } );
  23. } )( jQuery );
  24. </script>
Advertisement
Add Comment
Please, Sign In to add comment