Showing
1 changed file
with
4 additions
and
4 deletions
@@ -29,7 +29,7 @@ $('#nav-tab').on('touchend touchcancel', function(e) { | @@ -29,7 +29,7 @@ $('#nav-tab').on('touchend touchcancel', function(e) { | ||
29 | $contents.addClass('hide'); | 29 | $contents.addClass('hide'); |
30 | $contents.eq($this.index()).removeClass('hide'); | 30 | $contents.eq($this.index()).removeClass('hide'); |
31 | 31 | ||
32 | - if (typeof $this.swiper === 'undefined') {//解决隐藏式,swiper不渲染 | 32 | + if (typeof $this.swiper === 'undefined') { // 解决隐藏式,swiper不渲染 |
33 | $this.swiper = false; | 33 | $this.swiper = false; |
34 | $contents.find('li').each(function(key, item) { | 34 | $contents.find('li').each(function(key, item) { |
35 | $(item).find('.swiper-container').addClass('swiper-' + key); | 35 | $(item).find('.swiper-container').addClass('swiper-' + key); |
@@ -41,11 +41,11 @@ $('#nav-tab').on('touchend touchcancel', function(e) { | @@ -41,11 +41,11 @@ $('#nav-tab').on('touchend touchcancel', function(e) { | ||
41 | }); | 41 | }); |
42 | } | 42 | } |
43 | 43 | ||
44 | - $(document).trigger('scroll'); //Trigger lazyLoad | 44 | + $(document).trigger('scroll'); // Trigger lazyLoad |
45 | }); | 45 | }); |
46 | 46 | ||
47 | if ($('#nav-tab').find('li:eq(0)').hasClass('focus')) { | 47 | if ($('#nav-tab').find('li:eq(0)').hasClass('focus')) { |
48 | - //解决li隐藏 swiper不渲染的问题 | 48 | + // 解决li隐藏 swiper不渲染的问题 |
49 | $('#nav-tab').find('li:eq(0)').removeClass('focus'); | 49 | $('#nav-tab').find('li:eq(0)').removeClass('focus'); |
50 | $('#nav-tab').find('li:eq(0)').trigger('touchend'); | 50 | $('#nav-tab').find('li:eq(0)').trigger('touchend'); |
51 | } | 51 | } |
@@ -56,4 +56,4 @@ $('#nav-tab').on('touchstart', function(e) { | @@ -56,4 +56,4 @@ $('#nav-tab').on('touchstart', function(e) { | ||
56 | target.className = 'bytouch ' + target.className; | 56 | target.className = 'bytouch ' + target.className; |
57 | }).on('touchend touchcancel', function() { | 57 | }).on('touchend touchcancel', function() { |
58 | $navs.removeClass('bytouch'); | 58 | $navs.removeClass('bytouch'); |
59 | -}); | ||
59 | +}); |
-
Please register or login to post a comment