본문 바로가기

HTML

(HTML) 아코디언 예제

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

출처 : https://www.codingfactory.net/node/1064


알짜배기 에제


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!doctype html>
<html lang="ko">
  <head>
    <meta charset="utf-8">
    <title>Coding Factory</title>
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <script>
      jQuery( document ).ready( function() {
        $( '#jb-accordion' ).accordion();
      } );
    </script>
  </head>
  <body>
    <div id="jb-accordion">
      <h3>Lorem</h3>
      <div>
        <p>Lorem Ipsum Dolor</p>
      </div>
      <h3>Ipsum</h3>
      <div>
        <p>Lorem Ipsum Dolor</p>
      </div>
      <h3>Dolor</h3>
      <div>
        <p>Lorem Ipsum Dolor</p>
      </div>
    </div>
  </body>
</html>
cs