Hi All,
I am adding a custom block - for a WordPress site build.
The custom block pulls in posts from a custom post type (testimonials).
Each should go into the pre-built .wp-block-columns, but I want to add equalizer to balance the .card div within.
So I am trying to set some jQuery, to check if div with class ‘.wp-block-columns’ has an inner div with the class ‘.card’, and if so add the attr of data-equalizer & data-equalize-on=“medium”.
Here’s what I have, but it fails:
!function( ) {
( ‘.wp-block-columns’ ).find( ‘.singleTestimonial’ ) {
$(‘wp-block-columns’).attr( ‘data-equalizer’ );
}
} (jQuery);