EduardET

Untitled

Jul 13th, 2018
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. ( function( $ ) {
  3.     $( document ).ready( function() {
  4.         if ( $( 'body' ).hasClass( 'home' ) ) {
  5.             var project = $( '.et_pb_portfolio_0 .project' );
  6.             project.each( function() {
  7.                 var title = $( this ).find( '.et_portfolio_image img' ).attr( 'alt' ),
  8.                     overlay = $( this ).find( '.et_portfolio_image .et_overlay' );
  9.                 $( this ).find( 'a' ).attr( 'title', '' );
  10.                 overlay.prepend( '<p class="project-title">' + title + '</p>' );
  11.             } )
  12.         }
  13.     } );
  14. } )( jQuery );
  15. </script>
Advertisement
Add Comment
Please, Sign In to add comment