임에딘

리스트 접기/펼치기 기능 추가

Showing 1 changed file with 31 additions and 31 deletions
...@@ -4,11 +4,6 @@ ...@@ -4,11 +4,6 @@
4 <style> 4 <style>
5 .menu a{cursor:pointer;} 5 .menu a{cursor:pointer;}
6 .menu .hide{display:none;} 6 .menu .hide{display:none;}
7 - body{
8 - background-color: black;
9 - backgound-repeat: no-repeat;
10 - backgound-size: cover;
11 - }
12 </style> 7 </style>
13 <meta charset="utf-8"> 8 <meta charset="utf-8">
14 <link href="//netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" media="screen"> 9 <link href="//netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" media="screen">
...@@ -25,12 +20,7 @@ ...@@ -25,12 +20,7 @@
25 <script> 20 <script>
26 $(document).ready(function(){ 21 $(document).ready(function(){
27 $(".menu>a").click(function(){ 22 $(".menu>a").click(function(){
28 - var submenu = $(this).next("ul"); 23 + $(this).next("ul").toggleClass("hide");
29 - if( submenu.is(":visible") ){
30 - submenu.slideUp();
31 - }else{
32 - submenu.slideDown();
33 - }
34 }); 24 });
35 }); 25 });
36 </script> 26 </script>
...@@ -116,30 +106,40 @@ ...@@ -116,30 +106,40 @@
116 </select> 106 </select>
117 </div> 107 </div>
118 </div> 108 </div>
119 - <div>
120 - <ul>
121 - <li class="menu1">
122 - <a>img src="" alt="메뉴이미지1"/></a>
123 - <ul class="hide">
124 - <li>리스트1-1</li>
125 - <li>리스트1-2></li>
126 - <li>리스트1-3></li>
127 - </ul>
128 - </li>
129 - <li class="menu2">
130 - <a>img src="" alt="메뉴이미지2"/></a>
131 - <ul class="hide">
132 - <li>리스트2-1</li>
133 - <li>리스트2-2></li>
134 - <li>리스트2-3></li>
135 - </ul>
136 - </li>
137 - </ul>
138 - </div>
139 109
140 <a class="btn btn-primary" href="/build/create/">빌드</a> 110 <a class="btn btn-primary" href="/build/create/">빌드</a>
141 <br> 111 <br>
142 <br> 112 <br>
113 +<div>
114 + <ul>
115 + <li class="menu">
116 + <a><img src="" alt="상위메뉴이미지1"/></a>
117 + <ul class="hide">
118 + <li>메뉴1-1</li>
119 + <li>메뉴1-2</li>
120 + <li>메뉴1-3</li>
121 + <li>메뉴1-4</li>
122 + <li>메뉴1-5</li>
123 + <li>메뉴1-6</li>
124 + </ul>
125 + </li>
126 +
127 + <li class="menu">
128 + <a><img src="" alt="상위메뉴이미지2"/></a>
129 + <ul class="hide">
130 + <li>메뉴2-1</li>
131 + <li>메뉴2-2</li>
132 + <li>메뉴2-3</li>
133 + <li>메뉴2-4</li>
134 + <li>메뉴2-5</li>
135 + <li>메뉴2-6</li>
136 + </ul>
137 + </li>
138 + </ul>
139 +</div>
140 +
141 +<br>
142 +<br>
143 <a href="https://starcraft2.com/ko-kr/game">Official Site</a> 143 <a href="https://starcraft2.com/ko-kr/game">Official Site</a>
144 144
145 </body> 145 </body>
......