My partners, I'm losing my hair with this problem I'm facing.
I have some pages made with bootsptrap, in which each container has a row and has two columns (each with the following classes: col-xs-12 col-sm-12 col-md-6 col- lg-6), in this the lines are alternating between text / image and image / text where the Height value used as a reference is that of the image (usually it is bigger than the text blocks), in that I get the value of the image, I get the height of the text block, I subtract and divide the value by 2 to reach the margin-top so only to be able to vertically center the text blocks according to the center of the image.
I made some cats and I do not know if the logic would be this: link
The thing itself works, the problem however is that the code only works when we refresh the page when we load it again. It does not work when we open it for the first time and this is the problem as it should center as soon as the page loads.
Could someone tell me what my mistake is or if possible a way to solve it? Thanks!