Showing
1 changed file
with
5 additions
and
3 deletions
@@ -14,16 +14,17 @@ var $nav = $('.category-nav'), | @@ -14,16 +14,17 @@ var $nav = $('.category-nav'), | ||
14 | 14 | ||
15 | require('../common'); | 15 | require('../common'); |
16 | 16 | ||
17 | -(function() { | 17 | +function resetHeight() { |
18 | var $header = $('.yoho-header'), | 18 | var $header = $('.yoho-header'), |
19 | $search = $('#search-input'); | 19 | $search = $('#search-input'); |
20 | 20 | ||
21 | - var h = $(window).height() - $header.outerHeight() - $search.outerHeight() - $nav.outerHeight(); | 21 | + var h = document.body.scrollHeight - $header.outerHeight() - $search.outerHeight() - $nav.outerHeight(); |
22 | 22 | ||
23 | $categoryContainer.css('min-height', h); | 23 | $categoryContainer.css('min-height', h); |
24 | 24 | ||
25 | $contents.height(h); | 25 | $contents.height(h); |
26 | -}()); | 26 | +} |
27 | +resetHeight(); | ||
27 | 28 | ||
28 | $('#search-input').focus(function() { | 29 | $('#search-input').focus(function() { |
29 | $(this).blur(); | 30 | $(this).blur(); |
@@ -39,6 +40,7 @@ $nav.on('touchend touchcancel', function(e) { | @@ -39,6 +40,7 @@ $nav.on('touchend touchcancel', function(e) { | ||
39 | var $this = $(e.target).closest('li'), | 40 | var $this = $(e.target).closest('li'), |
40 | selector = '.' + $this.data('channel'); | 41 | selector = '.' + $this.data('channel'); |
41 | 42 | ||
43 | + resetHeight(); | ||
42 | if ($this.hasClass('focus')) { | 44 | if ($this.hasClass('focus')) { |
43 | return; | 45 | return; |
44 | } | 46 | } |
-
Please register or login to post a comment