Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- 트리메뉴-->
<!-- 마지막 리스트부분에 class="last",class="end" 넣어주세요 -->
<div class="tree_box">
    <div class="con">
        <ul id="tree_menu" class="tree_menu">
            <li class="depth_1"><strong>대금수납</strong>
                <ul class="depth_2" >
                    <li>
                        <a href="#none"><em>폴더</em> 일반계좌수납</a>
                        <ul class="depth_3">
                            <li><a href="#none">최신정보가져오기</a></li>
                            <li><a href="#none">수납내역조회</a></li>
                            <li><a href="#none">사납내역거래처확인</a></li>
                            <li><a href="#none">수납내역 거래처확인결과</a></li>
                            <li><a href="#none">매출채권관리</a></li>
                        </ul>
                    </li>
                    <li class="last">
                        <a href="#none"><em>폴더</em> 일반계좌수납</a>
                        <ul class="depth_3">
                            <li><a href="#none">최신정보가져오기</a></li>
                            <li><a href="#none">수납내역조회</a></li>
                            <li><a href="#none">사납내역거래처확인</a></li>
                            <li><a href="#none">수납내역 거래처확인결과</a></li>
                            <li class="end"><a href="#none">매출채권관리</a></li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li class="depth_1"><strong>대금수납</strong>
                <ul class="depth_2">
                    <li>
                        <a href="#none"><em>폴더</em> 일반계좌수납</a>
                        <ul class="depth_3">
                            <li><a href="#none">최신정보가져오기</a></li>
                            <li><a href="#none">수납내역조회</a></li>
                            <li><a href="#none">사납내역거래처확인</a></li>
                            <li><a href="#none">수납내역 거래처확인결과</a></li>
                            <li><a href="#none">매출채권관리</a></li>
                        </ul>
                    </li>
                    <li class="last">
                        <a href="#none"><em>폴더</em> 일반계좌수납</a>
                        <ul class="depth_3">
                            <li><a href="#none">최신정보가져오기</a></li>
                            <li><a href="#none">수납내역조회</a></li>
                            <li><a href="#none">사납내역거래처확인</a></li>
                            <li><a href="#none">수납내역 거래처확인결과</a></li>
                            <li class="end"><a href="#none">매출채권관리</a></li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
</div>
<!--//트리메뉴-->
              
            
!

CSS

              
                body { margin:0; padding: 0;}
ul, ol, li{list-style:none; font-size: 12px;}

/* 트리메뉴 */
.tree_box { width:400px; border:1px solid #ccd3d9;margin: 30px auto;}
.tree_box .title { padding:5px 0 5px 19px ;background:#f8f8f9;border-bottom:1px solid #ccd3d9;}
.tree_box .title strong {margin-right:12px;}
.tree_menu {line-height:18px;}
.tree_menu strong {font-weight:normal;}
.tree_menu label input {vertical-align:-2px;}
.tree_menu .depth_1 a {vertical-align:bottom;text-decoration:none;}
.tree_menu .depth_1 strong {padding-left:19px;background:url(http://cfile26.uf.tistory.com/image/224E6B45569458082AA795) no-repeat 0px 2px;}
.tree_menu .depth_2 li {margin-top:-2px;background:url(http://cfile9.uf.tistory.com/image/22601F4B569457FF051E7E) no-repeat 5px 0px;}
.tree_menu .depth_2 li a em {display:inline-block;width:31px;height:11px;background:url(http://cfile27.uf.tistory.com/image/2265AB4B569457FD1306CB) 100% 0;font-size:0;line-height:0;vertical-align:middle;}
.tree_menu .depth_2 li a em.on {background-position:0 100%;}
.tree_menu li.last {background:none;}
.tree_menu li.last {background:none;}
.tree_menu .depth_3 {display:none;padding-left:23px;}
.tree_menu .depth_3 li {margin:0;padding:3px 0 0 14px;line-height:1;background:url(http://cfile8.uf.tistory.com/image/2456D34B569457FC14828D) no-repeat 0 0;}
.tree_menu .depth_3 li a {display:block;padding-left:15px;background:url(http://cfile26.uf.tistory.com/image/216841455694580A1ADE12) no-repeat 0 2px;}
.msie6 .tree_menu .depth_3 li a {display:inline-block;}
.tree_menu li.end {background:url(http://cfile23.uf.tistory.com/image/2272CF4B5694580418FF9C) no-repeat 0 0;}
.form_tree_menu .depth_1 {background:url(http://cfile9.uf.tistory.com/image/22601F4B569457FF051E7E) no-repeat 5px 5px;}
.form_tree_menu ul.depth_2 li {margin-left:6px;padding-left:27px;background:url(http://cfile25.uf.tistory.com/image/2757834B5694580514C5D6) no-repeat 0 5px;}
              
            
!

JS

              
                function tree_menu() {
  // $('.depth_2');
  $('ul.depth_2 >li > a').click(function(e) {

    var temp_el = $(this).next('ul');
    var depth_3 = $('.depth_3');

    // 처음에 모두 슬라이드 업 시켜준다.
    depth_3.slideUp(300);
    // 클릭한 순간 모두 on(-)을 제거한다.// +가 나오도록
    depth_3.parent().find('em').removeClass('on');

    if (temp_el.is(':hidden')) {
      temp_el.slideDown(300);
      $(this).find('em').addClass('on').html('하위폴더 열림');
    } else {
      temp_el.slideUp(300);
      $(this).find('em').removeClass('on').html('하위폴더 닫힘');
    }

    return false;

  });
}
if ($('#tree_menu').is(':visible')) {
  tree_menu();
}
              
            
!
999px

Console