var height = $(this).prev(‘.wrapper’).height();
var height = $(this).parent().height();
and remember to select jQuery in the codepen JS menu.
Of course if you now put content into .block it will affect the height of the wrapper so each block will look higher than the height of the content above it. You can get round that with this but it will start getting messy:
So @waylaid could you tell me how then to do if there in wrapper are more element?
I tried but this isin’t working.