const $ = jQuery; $(window).load(function() { $(".wp-block-my-gvb-variable-column > .wp-block-column:first-child").each( function() { $(this).css( "flex-basis", $(this) .parent() .attr("data-width") + "%" ); } ); $(".wp-block-my-gvb-variable-column > .wp-block-column:nth-child(2)").each( function() { $(this).css( "flex-basis", 100 - $(this) .parent() .attr("data-width") + "%" ); } ); });