Coming soon thumbnail height fix
This commit is contained in:
@@ -127,6 +127,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
line-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 800px) {
|
@media all and (max-width: 800px) {
|
||||||
|
|||||||
@@ -106,10 +106,9 @@ Page.Home = new Class({
|
|||||||
timer,
|
timer,
|
||||||
highest = 100;
|
highest = 100;
|
||||||
|
|
||||||
images.each(function(img_container){
|
images.each(function(img){
|
||||||
img_container.getElements('img').addEvent('load', function(){
|
img.addEvent('load', function(){
|
||||||
var img = this,
|
var height = img.getSize().y;
|
||||||
height = img.getSize().y;
|
|
||||||
if(!highest || highest < height){
|
if(!highest || highest < height){
|
||||||
highest = height;
|
highest = height;
|
||||||
if(timer) clearTimeout(timer);
|
if(timer) clearTimeout(timer);
|
||||||
@@ -124,10 +123,8 @@ Page.Home = new Class({
|
|||||||
if(timer) clearTimeout(timer);
|
if(timer) clearTimeout(timer);
|
||||||
timer = (function(){
|
timer = (function(){
|
||||||
var highest = 100;
|
var highest = 100;
|
||||||
images.each(function(img_container){
|
images.each(function(img){
|
||||||
var img = img_container.getElement('img');
|
img.setStyle('height', null);
|
||||||
if(!img) return
|
|
||||||
|
|
||||||
var height = img.getSize().y;
|
var height = img.getSize().y;
|
||||||
if(!highest || highest < height)
|
if(!highest || highest < height)
|
||||||
highest = height;
|
highest = height;
|
||||||
|
|||||||
Reference in New Issue
Block a user