EduardET

show/hide blurb content

Nov 17th, 2017
132
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 blurb = $( ".wpc-blurb" );
  5.         blurb.each( function() {
  6.             var imageLink = $( this ).find( ".et_pb_main_blurb_image a" ),
  7.                 headerLink = $( this ).find( ".et_pb_module_header a" );
  8.             imageLink.click( function() {
  9.                 $( this ).parent().parent().find( ".et_pb_blurb_container .et_pb_blurb_description" ).slideToggle();
  10.             } );
  11.  
  12.             headerLink.click( function() {
  13.                 $( this ).parent().parent().find( ".et_pb_blurb_description" ).slideToggle();
  14.             } );
  15.         } )
  16.     } );
  17. } )( jQuery );
  18. </script>
Advertisement
Add Comment
Please, Sign In to add comment