recent activity nav update
Showing
3 changed files
with
30 additions
and
3 deletions
@@ -3,7 +3,8 @@ | @@ -3,7 +3,8 @@ | ||
3 | */ | 3 | */ |
4 | var $ = require('yoho-jquery'), | 4 | var $ = require('yoho-jquery'), |
5 | Countdown = require('./outlet/countdown'), | 5 | Countdown = require('./outlet/countdown'), |
6 | - tip = require('../plugin/tip'); | 6 | + tip = require('../plugin/tip'), |
7 | + iscroll = require('./outlet/nav'); | ||
7 | 8 | ||
8 | var $el = $('.cd-medium'); | 9 | var $el = $('.cd-medium'); |
9 | 10 | ||
@@ -17,6 +18,19 @@ if ($el.length > 0) { | @@ -17,6 +18,19 @@ if ($el.length > 0) { | ||
17 | }) | 18 | }) |
18 | } | 19 | } |
19 | 20 | ||
21 | +// 导航滚动 | ||
22 | +if ($('#index_nav').length > 0) { | ||
23 | + iscroll({ | ||
24 | + el: '#index_nav' | ||
25 | + }).goto($('#index_nav').find('.active').index()); | ||
26 | +} | ||
27 | + | ||
28 | +if ($('#list-nav').length > 0) { | ||
29 | + iscroll({ | ||
30 | + el: '#list-nav' | ||
31 | + }).goto(0); | ||
32 | +} | ||
33 | + | ||
20 | $('.will-end-back').on('click', function() { | 34 | $('.will-end-back').on('click', function() { |
21 | tip.show('活动即将结束'); | 35 | tip.show('活动即将结束'); |
22 | return false; | 36 | return false; |
@@ -3,7 +3,8 @@ | @@ -3,7 +3,8 @@ | ||
3 | */ | 3 | */ |
4 | var $ = require('yoho-jquery'), | 4 | var $ = require('yoho-jquery'), |
5 | Countdown = require('./outlet/countdown'), | 5 | Countdown = require('./outlet/countdown'), |
6 | - tip = require('../plugin/tip'); | 6 | + tip = require('../plugin/tip'), |
7 | + iscroll = require('./outlet/nav'); | ||
7 | 8 | ||
8 | var $el = $('.cd-lite'); | 9 | var $el = $('.cd-lite'); |
9 | 10 | ||
@@ -17,6 +18,19 @@ if ($el.length > 0) { | @@ -17,6 +18,19 @@ if ($el.length > 0) { | ||
17 | }) | 18 | }) |
18 | } | 19 | } |
19 | 20 | ||
21 | +// 导航滚动 | ||
22 | +if ($('#index_nav').length > 0) { | ||
23 | + iscroll({ | ||
24 | + el: '#index_nav' | ||
25 | + }).goto($('#index_nav').find('.active').index()); | ||
26 | +} | ||
27 | + | ||
28 | +if ($('#list-nav').length > 0) { | ||
29 | + iscroll({ | ||
30 | + el: '#list-nav' | ||
31 | + }).goto(0); | ||
32 | +} | ||
33 | + | ||
20 | $('.back-ground-white').on('click', function() { | 34 | $('.back-ground-white').on('click', function() { |
21 | tip.show('活动即将开始'); | 35 | tip.show('活动即将开始'); |
22 | return false; | 36 | return false; |
@@ -80,7 +80,6 @@ if ($('#list-nav').length > 0) { | @@ -80,7 +80,6 @@ if ($('#list-nav').length > 0) { | ||
80 | if ($('.back-ground-white').length > 10) { | 80 | if ($('.back-ground-white').length > 10) { |
81 | $('.more-activity').show(); | 81 | $('.more-activity').show(); |
82 | $('.back-ground-white').each(function(index, e) { | 82 | $('.back-ground-white').each(function(index, e) { |
83 | - console.log(index); | ||
84 | if(index > 9) { | 83 | if(index > 9) { |
85 | $(e).hide(); | 84 | $(e).hide(); |
86 | } | 85 | } |
-
Please register or login to post a comment