I've ran into a problem that the ($this) object's height is 0 on mobile while it has the height on desktop This problem only occurs on the first load of the site. After I reload it or i access the site via url, the object has the intended height!
Here's the code:
var maxLaenge = 0;
var minHoehe = 0;
$(this).find(".img").each(function() {
var imgLaenge = $(this).width();
if (imgLaenge > maxLaenge) {
maxLaenge = imgLaenge;
minHoehe = $(this).height();
console.log($(this));
}
});