From cd04c9cb601ccbeff533fa3e01237fb3ab4716bc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 4 Apr 2016 17:31:33 -0400 Subject: scrollable nav --- public/assets/js/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'public/assets/js/app.js') diff --git a/public/assets/js/app.js b/public/assets/js/app.js index e34eb52..6fa5724 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -98,17 +98,19 @@ var app = (function() { app.resizeItems = function(){ var windowHeight = window.innerHeight + var navHeight = $("nav").height() if (is_iphone) { windowHeight -= 22 // account for lower bar window.scrollTo(0,0) + $(".menu").height( windowHeight + 16 - navHeight ) } $(".item").each(function(i){ var height = windowHeight - ($(this).find(".bottom").height() + 10) if (is_desktop) { - height -= $("nav").height() // account for top bar + height -= navHeight // account for top bar } $(".cell, .top, .previous, .next, .flickity-viewport", this).css({ 'height': height }) -- cgit v1.2.3-70-g09d2