cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<div class="new_three_tree" id="treea">
            <div class="ntt_title"><span></span><a href="${base}/business/pages/cms/page/linkcateList.html" target="myiframe">友情链接分类</a></div>
            
            [#if cates?? && cates?size>0]
                [#list cates as cate]
                    <div [#if firstCate?? && firstCate != cate.ID]class="ntt_one  firstTree"[#else]class="ntt_one current firstTree"[/#if]><span></span><a href="${base}/business/pages/cms/page/linkcateList.html?pId=${cate.ID}" target="myiframe">${cate.CATEGORY_NAME}</a></div>
                    [#if cate.ejTree?? && cate.ejTree?size>0]
                        <ul class="ntt_two_con" [#if firstCate?? && firstCate != cate.ID]style="display:none;"[/#if]>
                            [#list cate.ejTree as ej]
                                <li class="ntt_two secondTree">
                                    <div [#if secondCate?? && secondCate != ej.ID]class="ntt_two_btn secondTreeBtn"[#else]class="ntt_two_btn current secondTreeBtn"[/#if]><span></span><a href="${base}/business/pages/cms/page/linkcateList.html?pId=${ej.ID}" target="myiframe">${ej.CATEGORY_NAME}</a></div>
                                    [#if ej.sjTree?? && ej.sjTree?size>0]
                                        <ul class="thirdTree" [#if secondCate?? && secondCate != ej.ID]style="display:none;"[/#if]>
                                            [#list ej.sjTree as sj]
                                                <li class="current"><span></span><a href="#" target="myiframe">${sj.CATEGORY_NAME}</a></li>
                                            [/#list]
                                        </ul>
                                    [/#if]
                                </li>
                            [/#list]
                        </ul>
                    [/#if]
                [/#list]
            [#else]
            <div class="loadpos"><span class="nodata"></span></div>
            [/#if]
        </div>
        
        
        <script type="text/javascript">
        $(function() {
            $("div.firstTree").click(function() {
                var $nextUl = $(this).next("ul");
                if($nextUl.is(":visible")) {
                    $(this).removeClass("current");
                    $nextUl.slideUp("show");
                } else {
                    $(this).addClass("current");
                    $nextUl.slideDown("show");
                }
            });
            
            $("li.secondTree").click(function() {
                var $nextUl = $(this).find("ul");
                if($nextUl.is(":visible")) {
                    $(this).find(".secondTreeBtn").removeClass("current");
                    $nextUl.slideUp("show");
                } else {
                    $(this).find(".secondTreeBtn").addClass("current");
                    $nextUl.slideDown("show");
                }
            });
            
            
            $("div.firstTree>a").click(function(event) {
                afocus($(this));
                event.stopPropagation();
            });
            
            $("div.secondTreeBtn>a").click(function(event) {
                afocus($(this));
                event.stopPropagation();
            });
            
            
            $("ul.thirdTree a").click(function(event) {
                afocus($(this));
                event.stopPropagation();
            });
        })
        
        var $treea = $("#treea a");
        function afocus($dom) {
            $treea.removeClass("current");
            $dom.addClass("current");
        }
        
        
    </script>