Cuando consola.log(titleHeight); Obtengo 0 en Firefox pero la altura correcta en Chrome... ¿Alguna idea de por qué?
$('.projects__col').each(function() { const _this = $(this); let titleHeight = title.height(); console.log(titleHeight); // gives me the correct height in Chrome but 0 in firefox _this.click(function () { _this.css({ 'transform': `translateY(-${titleHeight}px)`, '-o-transform': `translateY(-${titleHeight}px)`, '-moz-transform': `translateY(-${titleHeight}px)`, '-webkit-transform': `translateY(-${titleHeight}px)`, }); }); });use este mismo código después de: const _this = $(this);
$(this) .load(function() { //$('#result1').text('Image is loaded!'); let titleHeight = title.height(); console.log(titleHeight); }) .error(function() { $('#result1').text('Image is not loaded!'); });