Add data-attr for Equalizer

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);

Try $('wp-block-columns').attr( 'data-equalizer', ''). The .attr(name) version only reads / gets the attribute value.

Hey Daniel, I had tried that… it does add the attribute OK, and outputs it correctly.
But it doesn’t affect the layout (the equalizer does not equalize).
Also was able to add the
.attr( ‘data-equalize-by-row’, ‘true’)
Looks like the issue is something to do with the columns block, within the WordPress block editor. I will look into it more, as I am sure others have run into the same issue.

You may have to reinit the equalizer or rerun $(document).foundation().