Commit 90ba46331870b63e29f24e4e68a4738839c3cf8f
1 parent
a98b654f
index api 列表
Showing
3 changed files
with
17 additions
and
8 deletions
css/libCss/common.css
@@ -130,12 +130,15 @@ section{ | @@ -130,12 +130,15 @@ section{ | ||
130 | color: #fff; | 130 | color: #fff; |
131 | cursor: pointer; | 131 | cursor: pointer; |
132 | } | 132 | } |
133 | -.link-div span:nth-of-type(1){ | ||
134 | - background:url("../../image/link-div-1.png"); | ||
135 | -} | ||
136 | -.link-div span:nth-of-type(2){ | 133 | +/*.link-div span:nth-of-type(1){*/ |
134 | + /*background:url("../../image/link-div-1.png");*/ | ||
135 | +/*}*/ | ||
136 | +.link-div span{ | ||
137 | background:url("../../image/link-div-2.png"); | 137 | background:url("../../image/link-div-2.png"); |
138 | } | 138 | } |
139 | +.link-div span.linkActive{ | ||
140 | + background:url("../../image/link-div-1.png"); | ||
141 | +} | ||
139 | .link-con-left{ | 142 | .link-con-left{ |
140 | padding-right: 32px; | 143 | padding-right: 32px; |
141 | width: 734px; | 144 | width: 734px; |
index.html
@@ -45,11 +45,11 @@ | @@ -45,11 +45,11 @@ | ||
45 | </nav> | 45 | </nav> |
46 | <section class="float-left"> | 46 | <section class="float-left"> |
47 | <div class="section-wrap"> | 47 | <div class="section-wrap"> |
48 | - <div class="link-div"> | ||
49 | - <span>总体概况</span> | 48 | + <div class="link-div" id="link-div"> |
49 | + <span class="linkActive">总体概况</span> | ||
50 | <span>API 列表</span> | 50 | <span>API 列表</span> |
51 | </div> | 51 | </div> |
52 | - <div class="link-con"> | 52 | + <div class="link-con" id="link-con"> |
53 | <div class="link-con-1"> | 53 | <div class="link-con-1"> |
54 | <div class="link-con-left float-left"> | 54 | <div class="link-con-left float-left"> |
55 | <div class="link-con-left-wrap marginright32 boder-raduis5"> | 55 | <div class="link-con-left-wrap marginright32 boder-raduis5"> |
js/index.js
@@ -103,4 +103,10 @@ var fun = { | @@ -103,4 +103,10 @@ var fun = { | ||
103 | myChart.setOption(option); | 103 | myChart.setOption(option); |
104 | }, | 104 | }, |
105 | }; | 105 | }; |
106 | -fun.init(); | ||
107 | \ No newline at end of file | 106 | \ No newline at end of file |
107 | +fun.init(); | ||
108 | +$('#link-div span').on('click',function () { | ||
109 | + var index = $(this).index(); | ||
110 | + $(this).addClass('linkActive').siblings('span').removeClass('linkActive'); | ||
111 | + $('#link-con .link-con-1').addClass('display-none'); | ||
112 | + $('#link-con .link-con-1').eq(index).removeClass('display-none'); | ||
113 | +}); | ||
108 | \ No newline at end of file | 114 | \ No newline at end of file |