Coming soon thumbnail height fix

This commit is contained in:
Ruud
2014-03-08 16:50:53 +01:00
parent f2bc735bc0
commit f8bfd6fd3f
2 changed files with 6 additions and 8 deletions

View File

@@ -127,6 +127,7 @@
margin: 0;
padding: 0;
vertical-align: top;
line-height: 0;
}
@media all and (max-width: 800px) {

View File

@@ -106,10 +106,9 @@ Page.Home = new Class({
timer,
highest = 100;
images.each(function(img_container){
img_container.getElements('img').addEvent('load', function(){
var img = this,
height = img.getSize().y;
images.each(function(img){
img.addEvent('load', function(){
var height = img.getSize().y;
if(!highest || highest < height){
highest = height;
if(timer) clearTimeout(timer);
@@ -124,10 +123,8 @@ Page.Home = new Class({
if(timer) clearTimeout(timer);
timer = (function(){
var highest = 100;
images.each(function(img_container){
var img = img_container.getElement('img');
if(!img) return
images.each(function(img){
img.setStyle('height', null);
var height = img.getSize().y;
if(!highest || highest < height)
highest = height;