Showing
1 changed file
with
17 additions
and
16 deletions
@@ -21,23 +21,24 @@ goodsSwiper = new Swiper('.banner-swiper', { | @@ -21,23 +21,24 @@ goodsSwiper = new Swiper('.banner-swiper', { | ||
21 | }); | 21 | }); |
22 | 22 | ||
23 | 23 | ||
24 | -$('#nav-tab li').on('click',function(){ | ||
25 | - if(!$(this).hasClass('focus')){ | ||
26 | - | ||
27 | - $('#nav-tab li').each(function(){ | ||
28 | - $(this).removeClass('focus'); | ||
29 | - }); | ||
30 | - | ||
31 | - $('#feedback-content .content').each(function(){ | ||
32 | - console.log('hello'); | ||
33 | - $(this).addClass('hide'); | ||
34 | - }); | ||
35 | - | ||
36 | - $(this).addClass('focus'); | ||
37 | - var index = $(this).index(); | ||
38 | - $('#feedback-content .content:eq('+index+')').removeClass('hide'); | ||
39 | - } | 24 | +$('#nav-tab li').on('click', function() { |
25 | + var index = $(this).index(); | ||
26 | + | ||
27 | + | ||
28 | + if (!$(this).hasClass('focus')) { | ||
29 | + | ||
30 | + $('#nav-tab li').each(function() { | ||
31 | + $(this).removeClass('focus'); | ||
32 | + }); | ||
33 | + $('#feedback-content .content').each(function() { | ||
34 | + $(this).addClass('hide'); | ||
35 | + }); | ||
36 | + | ||
37 | + $(this).addClass('focus'); | ||
38 | + $('#feedback-content .content:eq(' + index + ')').removeClass('hide'); | ||
39 | + } | ||
40 | }); | 40 | }); |
41 | + | ||
41 | // $('#iframe').load(function() { | 42 | // $('#iframe').load(function() { |
42 | // var mainheight = $(this).contents().find('body').height() + 30; | 43 | // var mainheight = $(this).contents().find('body').height() + 30; |
43 | // $(this).height(mainheight); | 44 | // $(this).height(mainheight); |
-
Please register or login to post a comment