Showing
1 changed file
with
6 additions
and
6 deletions
@@ -81,9 +81,9 @@ var $listNav = $('#list-nav'), | @@ -81,9 +81,9 @@ var $listNav = $('#list-nav'), | ||
81 | searching; | 81 | searching; |
82 | 82 | ||
83 | var viewType = 1,// 1-首页,2-上新,3-人气 | 83 | var viewType = 1,// 1-首页,2-上新,3-人气 |
84 | - categoryListCount = $('.category-list li').length, | ||
85 | - categoryListModValue = 4 - categoryListCount % 4, | ||
86 | - categoryListIndex; | 84 | + listCount = $('.category-list li').length, |
85 | + listModValue = 4 - listCount % 4, | ||
86 | + listIndex; | ||
87 | 87 | ||
88 | lazyLoad($('img.lazy')); | 88 | lazyLoad($('img.lazy')); |
89 | 89 | ||
@@ -124,9 +124,9 @@ if ($('.category-list li').length < 4) { | @@ -124,9 +124,9 @@ if ($('.category-list li').length < 4) { | ||
124 | $('.category-list').find('.buriedpoint').addClass('category-list-only-one-row'); | 124 | $('.category-list').find('.buriedpoint').addClass('category-list-only-one-row'); |
125 | } | 125 | } |
126 | 126 | ||
127 | -if ($('.category-list li').length > 5) { | ||
128 | - for (categoryListIndex = categoryListModValue; categoryListIndex >= 0; categoryListIndex--) { | ||
129 | - $('.category-list li:eq(count - 4 + categoryListIndex -1)').addClass('category-list-last-full-row'); | 127 | +if ($('.category-list li').length >= 5) { |
128 | + for (listIndex = listModValue; listIndex >= 0; listIndex--) { | ||
129 | + $('.category-list li').eq(listCount - 4 + listIndex - 1).addClass('category-list-last-full-row'); | ||
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 |
-
Please register or login to post a comment