EduardET

Untitled

Jul 5th, 2018
149
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 changeLayout() {
  5.             var blog = $( '.wpc-blog' );
  6.             if ( blog.length ) {
  7.                 var article = blog.find( 'article' );
  8.                 article.each( function() {
  9.                     var a_header = $( this ).find( '.entry-title, .post-meta' ),
  10.                         a_content = $( this ).find( '.post-content' );
  11.                     a_header.wrapAll( '<div class="wpc-left"></div>' );
  12.                     a_content.wrapAll( '<div class="right"></div>' );
  13.                 } )
  14.             }
  15.         }
  16.         changeLayout();
  17.         $( document ).ajaxSuccess( function() {
  18.             changeLayout()
  19.         } );
  20.     } );
  21. } )( jQuery );
  22. </script>
Advertisement
Add Comment
Please, Sign In to add comment