无标题文档*{padding:0;margin:0;list-style:none;}body{min-width:320px;max-width:640px;margin:0auto;}.nav{border-bottom:1pxsolid#666;overflow:hidden;}.navli{float:left;width:25%;height:40px;line-height:40px;text-align:center;}.navli.active{border-bottom:2pxsolidred;}.list{display:none;}.list.active{display:block;}.listli{height:40px;border-bottom:1pxsolid#ccc;}1234$(function(){vardata=[{hasclick:true,list:[{time:160},{time:150},{time:140},{time:130}]},{hasclick:true,list:[{time:260},{time:250},{time:240},{time:230}]},{hasclick:true,list:[{time:360},{time:350},{time:340},{time:330}]},{hasclick:true,list:[{time:460},{time:450},{time:440},{time:430}]}];varIndex=0;timeFn()$(".navli").click(function(){var_this=thisIndex=$(this).index();$(this).addClass("active").siblings().removeClass("active");$(".list").eq(Index).addClass("active").siblings().removeClass("active");timeFn()})functiontimeFn(){varlist=data[Index].list;for(vari=0;i
添加回答
举报
0/150
提交
取消