标签:i++ dcl ddc div logs [1] var class color
1 // 高亮当前菜单 2 (function(){ 3 var nav_t = [ 4 [$(‘.p1‘),$(‘.nav li:nth-child(1)‘)], 5 [$(‘.p2‘),$(‘.nav li:nth-child(2)‘)], 6 [$(‘.p3‘),$(‘.nav li:nth-child(3)‘)], 7 [$(‘.p4‘),$(‘.nav li:nth-child(4)‘)] 8 ]; 9 10 function nav_on(arr){ 11 var len = arr.length; 12 for(var i=0; i<=len; i++){ 13 if(arr[i][0].size()>0){ 14 arr[i][1].addClass(‘on‘); 15 } 16 }; 17 }; 18 19 nav_on(nav_t); 20 })()
标签:i++ dcl ddc div logs [1] var class color
原文地址:http://www.cnblogs.com/iloveyou-sky/p/6593417.html