From 0b5f32a4e7aeab64af18d60f138e0013849539af Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 29 Mar 2016 16:52:35 -0400 Subject: fix this weird sizing issue --- public/assets/js/app.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'public/assets/js') diff --git a/public/assets/js/app.js b/public/assets/js/app.js index ba7c247..bfd317b 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -80,8 +80,10 @@ var app = (function() { })() -$(".top").each(function(){ - var height = $(this).height() - 10 +var heights = [] +$(".top").each(function(i){ + var height = $(this).height() + heights[i] = height $(".cell", this).css({ 'height': (height + 'px') }) }) @@ -90,9 +92,8 @@ $('.top').flickity(app.flickity_options).on( 'cellSelect', function(e) { app.header.updateSlideNumber( gallery.selectedIndex ) }) -$(".top").each(function(){ - var height = $(this).height() - 10 - console.log(height) +$(".top").each(function(i){ + var height = heights[i] $(".previous, .next", this).css({ 'height': (height + 'px') }) }) -- cgit v1.2.3-70-g09d2