Explorar el Código

积分榜逻辑

tangxijun hace 5 años
padre
commit
21223fbb6c

+ 3 - 4
2019专题/1908DOTA2/src/_index.html

@@ -330,8 +330,7 @@
                 </div>
             </div>
         </div>
-        <!-- 积分榜 -->
-        -->
+   
   
         <!-- 积分排行 -->
         <div class="zt-mod-score pt-60" id="score">
@@ -356,10 +355,10 @@
 
                     
                     <div class="clearfix  score-nav-sub" data-type="statuList">
-                        <div class="fl nav_item_sub nav active" data-st="1">
+                        <div class="fl nav_item_sub nav active " data-st="1">
                             <span >A组</span>
                         </div>
-                        <div class="fl nav_item_sub nav" data-st="2">
+                        <div class="fl nav_item_sub nav " data-st="2">
                             <span>B组</span>
                         </div>
                     </div>

+ 5 - 15
2019专题/1908DOTA2/src/modules/page/index.js

@@ -190,21 +190,22 @@ var C = {
 
         $('[data-type=statuList]').show()
 
-        $('.scroeTwo .nav_item').on('mouseenter',function(){
+        $(' .nav_item').on('mouseenter',function(){
             $(this).addClass('active').siblings().removeClass('active')
             mtIdOne = $(this).attr('data-mt')
             if(parseInt(mtIdOne)==1){
                 $('[data-type=statuImg]').hide()
                 $('[data-type=statuList]').show()
+                $('[data-type=statuList] .nav_item_sub').eq(parseInt(subIdOne-1)).addClass('active').siblings().removeClass('active')
             }else{
-                $('[data-type=statuImg]').show()
                 $('[data-type=statuList]').hide()
+                $('[data-type=statuImg]').show()
+                $('[data-type=statuImg] .nav_item_sub').eq(parseInt(subIdOne-1)).addClass('active').siblings().removeClass('active')
             }
-            subIdOne = 1
             show($conTwo)
         })
 
-        $('.scroeTwo .nav_item_sub').on('mouseenter',function(){
+        $(' .nav_item_sub').on('mouseenter',function(){
             $(this).addClass('active').siblings().removeClass('active')
             subIdOne = $(this).attr('data-st')
             show($conTwo)
@@ -236,17 +237,6 @@ var C = {
         }
     }
 
-    // initWordLimit:function(isPc){
-    //    var  limitWord = 0
-    //    limitWord= isPc?34:24
-    //     var cname = $('.video-item h4');
-    //     for (var i = 0; i < cname.length; i++) {      
-    //         var nowLength = cname[i].innerHTML.length;
-    //         if (nowLength > limitWord) {
-    //             cname[i].innerHTML = cname[i].innerHTML.substr(0, limitWord) + '...';
-    //         }      
-    //     } 
-    // }
 }
 
 V.init();