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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
<?php $cur_img_url = $j3_img_url."/".$sk['sk_img_path'];
$cate_array = cate_lv0_list_get();
if($skin_css!=''){ echo $skin_css; } else { ?> <style> /*전체카테고리*/ #hd_cate {position:absolute;top:133px;z-index:1000;} .all_cate{display:none;position: absolute;top:39px;left:0;width:1200px;margin-left:0;background-color:#fff;border:1px solid #1f1f1f;z-index:1001;} .all_cate_ico{line-height:38px;margin-right:50px;} .all_cate_pro{margin:15px 29px;;} .all_cate_pro li{margin-right:42px;} .all_cate_pro li:nth-child(6n){margin:0;} .cate_title{float:left;width: 155px;min-height:100px} .cate_title h4{display: block;height:35px;border-bottom:2px solid #141414;text-align:left;text-indent:10px;line-height:31px;color: #141414;font-size:11pt;} .cate_sec{margin:10px 0 0;text-align:left;} .cate_sec li{margin:0;} .cate_sec li:hover{background:#f2f2f2;} .cate_sec li a{display: block;line-height:30px;font-size:10pt;margin:0 10px 0;} /*3차 카테고리가 있을경우 화살표 표시*/ .cate_sec li.arrow{position:relative; background:url("<?php echo $cur_img_url;?>/arrow_cate.png") no-repeat 93% 12px} .cate_sec li.arrow:hover{background:url("<?php echo $cur_img_url;?>/arrow_cate.png") no-repeat 93% 12px #f2f2f2;} .cate_third{ display:none; left:150px;top:-10px; position: absolute;padding:10px 0;background:#fff;border:1px solid #bdbdbd;z-index:1002;} .cate_third li{min-width:160px;} .cate_third li a{line-height:27px;min-width:180px;padding:0 15px;} .cate_third li:hover{background:#f2f2f2;} </style> <?php } ?> <div id="wrapper" class="class_skin_idx_<?php echo $sk_idx;?> menu01_pc_class"> <!--전체카테고리 메뉴--> <div id="hd_cate"> <div class="float_l"> <a href="#" class="all_cate_ico"><img src="<?php echo $cur_img_url;?>/all_cate_btn.png" alt="전체카테고리"></a> <!--전체카테고리--> <div class="all_cate"> <ul class="all_cate_pro"> <!--카테고리 01--> <?php foreach($cate_array as $key=>$cate){ $cate2_array = cate_lv1_list_get(substr($cate['code2'],0,3)); //_pr($cate2_array); ?> <li class="cate_title cate1_li_class"><!--all_cate_title --> <input type='hidden' name='cate_code' value='<?php echo $cate['code2'];?>'> <h4><?php echo $cate['name'];?></h4> <ul class="cate_sec"> <?php foreach($cate2_array as $key2=>$cate2){ $cate3_array = cate_lv2_list_get(substr($cate2['code2'],0,6)); if(count($cate3_array)>0){ $arrow_class = "arrow"; $sub_div = "<div class='cate_third'><ul>"; foreach($cate3_array as $key3=>$cate3){ $sub_div .= "<li><a href='{$j3_shop_url}/list.php?code={$cate3['code2']}'>{$cate3['name']}</a></li>"; } $sub_div .= "</ul></div>"; } else { $arrow_class = ""; $sub_div = ""; } ?> <li class='<?php echo $arrow_class;?>'> <a href="<?php echo $j3_shop_url;?>/list.php?code=<?php echo $cate2['code2'];?>"><?php echo $cate2['name'];?></a> <?php echo $sub_div; ?> </li> <?php } ?> </ul> </li> <?php } ?> </ul> </div><!--all_cate--> </div><!--float_l--> </div> </div> <script> $(function(){ $(".all_cate_ico").mouseenter(function(){ // 메뉴 마우스오버 $(".all_cate").show();
$max_height = 100; // 메뉴 높이 가장 긴것으로 맞춤 $(".cate_title").each(function(){ if($max_height<$(this).height()){ $max_height = $(this).height(); } }); $max_height = parseInt($max_height)+10; $(".cate_title").css("height",$max_height+"px"); }); $(".all_cate").mouseleave(function(){ // 메뉴 마우스아웃 $(".all_cate").hide(); });
$(".cate1_li_class h4").css("cursor","pointer").click(function(){ // 분류1차 클릭시 처리 $cate_code = $(this).closest("li").find("input[name='cate_code']").val(); document.location.href="<?php echo $j3_shop_url;?>/list.php?code="+$cate_code; });
$(".cate_sec .arrow").mouseenter(function(){ // 2차분류 마우스 오버시 3차분류 표시 $(this).find(".cate_third").show(); }).mouseleave(function(){ $(".cate_third").hide(); }); $(".cate_third").mouseleave(function(){ $(".cate_third").hide(); }); }); </script>
|