Pressing ctrl + f5, the script of the same height appears crooked?

-------------THE ISSUE HAS BEEN RESOLVED-----------------

Please tell me, when you press ctrl + f5 on the website all the blocks which should be written the same height - fit to each other, and when it just refreshes the page via f5, everything is fine, what could be the problem?
The link to the page new.tman.su/catalog/punchers/sds
The script looks like the following:

setEqualHeightDivs function(elem, min_height) {
 var height = 0;

 // Find the maximum height
 $(elem).each(function() {
 var element_height = $(this).height();
 height = (element_height > height) ? element_height : height;
});

 // set the height
 $(elem).each(function() {
$(this).height(height);
});
}

Function call:
setEqualHeightDivs($(".catalog-item h3"));

The function call is inside $(document).ready(function() { .... }) however, the problem is the place to be still, not constantly - that is when a lot of times update - most often everything is fine, but periodically everything shifts. The same problem occurs when ajax download - when is replaced by the list of goods (based on the filter queries), when you refresh the page ctrl + f5 - the blocks fit each other
June 27th 19 at 15:31
2 answers
June 27th 19 at 15:33
wrap it all in

$(document).ready(function() {
...
 })
the function call is inside $(document).ready(function() { .... }) however, the problem is the place to be still, not constantly - that is when a lot of times update - most often everything is fine, but periodically everything shifts.
The same problem occurs when ajax download - when is replaced by the list of goods (based on the query filter) - also probably due to the fact that they don't have time to load their height is less than it should be - reinhold_Macejkovic58 commented on June 27th 19 at 15:36
try to add setTimeout can solve the problem - Jonathon84 commented on June 27th 19 at 15:39
June 27th 19 at 15:35
better
$(document).on("load", function(){})
That hadn't been uploaded yet pictures

Find more questions by tags CachingjQuery