$(function() { $(".header .nav .nav-li").eq(3).addClass("ac"); //导航菜单选中状态 var objTabsList = $('#tabsList'); var tabList = $.jCookie('tabsList'); if (!tabList) { tabList = 'cardView'; } objTabsList.find('a[href*="' + tabList + '"]').tab('show'); objTabsList.find('a[data-toggle="tab"]').on('shown.bs.tab', function(e) { var t = e.target.toString(); t = t.substr(t.indexOf('#') + 1); $.jCookie('tabsList', t); }); // 答题人数 /* var answernum = $(".answer-num"); if (answernum.length > 0) { answernum.each(function () { var num = $(this); var datanum = num.attr('data-nums'); if (datanum.length > 0) { datanum = JSON.parse(datanum); var x = []; var y = []; var i = 0; $.each(datanum, function (k, v) { if (i >= Object.keys(datanum).length - 7) { x.push(k.substr(7)); y.push(v); } i++; }); var myChart = echarts.init(num[0]); var data = { xAxis:x, series:y }; var option = { title: { text: '查看人数', textStyle: { color: '#333', fontSize: 14 } }, grid: { bottom: 20, top: 50, left: 20, right: 20 }, xAxis: { type: 'category', data: data.xAxis, axisTick: { show: false }, axisLine: { lineStyle: { color: "#aaa", type: 'dashed' } } }, tooltip: { show: true }, yAxis: { type: 'value', axisTick: { show: false }, axisLine: { lineStyle: { color: "#aaa", type: 'dashed' } }, axisLabel: { show: false }, splitLine: { show: false } }, series: [{ data: data.series, type: 'line', smooth: true, itemStyle: { normal: { color: "#fff", borderColor: { type: 'linear', x: 0, y: 0, x2: 1, y2: 1, colorStops: [{ offset: 0, color: '#71dced' // 0% 处的颜色 }, { offset: 1, color: '#2862c7' // 100% 处的颜色 }], globalCoord: false // 缺省为 false } } }, lineStyle: { normal: { color: { type: 'linear', x: 0, y: 0, x2: 1, y2: 1, colorStops: [{ offset: 0, color: '#71dced' // 0% 处的颜色 }, { offset: 1, color: '#2862c7' // 100% 处的颜色 }], globalCoord: false // 缺省为 false } } }, symbol: 'emptyCircle', symbolSize: 5, showAllSymbol: true }] }; myChart.setOption(option); } }); }*/ /* $("#cardView .list-item>a").hover(function() { $(this).find(".item-b").stop().animate({ "bottom": 0 }); }, function() { $(this).find(".item-b").stop().animate({ "bottom": -40 }); });*/ $("#cardView .list-item .item-m .subject-name>span").each(function(i, v) { switch (v.className) { case "KM01": $(v).text("语文"); break; case "KM02": $(v).text("数学"); break; case "KM03": $(v).text("外语"); break; case "KM04": $(v).text("物理"); break; case "KM05": $(v).text("化学"); break; case "KM06": $(v).text("思想品德"); break; case "KM07": $(v).text("历史"); break; case "KM08": $(v).text("地理"); break; case "KM09": $(v).text("生物"); break; } }); }); $('.SearchCon').each(function () { var SearchCon = $(this); switch (SearchCon[0].tagName.toLowerCase()) { case 'ul': if (SearchCon.children().length == 0) SearchCon.html('