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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
<?php $cur_img_url = $j3_img_url."/".$sk['sk_img_path'];
if($skin_css!=''){ echo $skin_css; } else { ?> <style> /* 메인 :전체카테고리 */ #hd_cate {position:absolute;left:-200px;top:133px;width:190px;z-index:10;} #hd_cate .all_cate {padding-left:60px;font-size:1.25em;line-height:41px;background:url('<?php echo "{$j3_img_url}/menu01/all_cate.png";?>') 30px 3px no-repeat;} #hd_cate_inner {border-top:3px solid #60b23b;border-bottom:3px solid #60b23b;border-radius:3px;background-color:rgba(0, 0, 0, 0.7);} #hd_cate_inner .first {margin-top:20px;} #hd_cate_inner .last {margin-bottom:20px;} #hd_cate_inner .cate_menu {display:block;padding:0 30px;color:#FFF;font-weight:600;line-height:55px;} #hd_cate_inner .cate_menu a:hover {color:#60b23b;} #hd_cate_inner .cate_menu a {color:#fff;} #hd_cate_inner .cate_menu img {margin-right:20px;}
.cate_layer { display:none; position:absolute; top:0px; left:342px; width:200px; min-height:200px; background:#f0f0f0; border:1px solid #999; z-index:998; } .cate_layer ul li { font-weight:bold; line-height:23px; padding:5px 5px 5px 10px; } .cate_more_ico { position:absolute; right:5px; font-size:1.2em; } .cate2_layer { display:none; position:absolute; top:0px; left:540px; width:200px; min-height:100px; background:#f0f0f0; border:1px solid #999; z-index:999; } .cate2_layer ul li { line-height:23px; padding:5px 5px 5px 10px; } @media(max-width:1600px){ #hd_cate h3 { background:#fff; } .menu01_pc_class {position:fixed !important;left:200px;z-index:9999;} } </style> <?php } $cate_array = cate_lv0_list_get(); ?> <div id="wrapper" class="class_skin_idx_<?php echo $sk_idx;?> menu01_pc_class"> <h2 class="screen_out">쇼핑몰메뉴</h2> <div id="hd_cate"> <h3><a class="all_cate">전체 카테고리</a></h3> <div id="hd_cate_inner"> <ul> <?php for($i=0;$i<count($cate_array);$i++){ $cate = $cate_array[$i]; if($i==0){ $class1="first"; } else { $class1=""; } if($i==count($cate_array)-1){ $class2="last"; } else { $class2=""; } ?> <li class="cate_menu <?php echo $class1.$class2;?>"> <input type='hidden' name='cate_code' value='<?php echo $cate['code2'];?>'> <a href='<?php echo "{$j3_shop_url}/list.php?code={$cate['code2']}";?>'> <?php if(file_exists("{$j3_data_path}/ico/cate_{$cate['code']}")){?><img src="<?php echo "{$j3_data_url}/ico/cate_{$cate['code']}";?>" alt="<?php echo $cate['name'];?>"><?php }?> <?php echo $cate['name'];?></a></li> <?php } ?> </ul> </div> </div> </div> <input type='hidden' name='menu_over' value='over' class='menu_over'> <script> $(function(){ $.get("ajax.sub_cate_get.php",function(rtn){ // 하위카테고리 미리 가져오기 $(".sub_cate_layers").html(rtn); }); $(document).on("mouseenter",".cate_menu",function(){ // 하위메뉴 마우스오버용 추가 $(".cate_layer, .cate2_layer").hide(); $cur_cc = ""; $cur_html = ""; $cate_code = $(this).find("input[name='cate_code']").val(); $pos = $(this).offset(); $(".sub1_cates").each(function(){ $sub_cc = $(this).find("input[name='cate_code']").val(); if($cate_code==$sub_cc){ $cur_cc = $cate_code; $cur_html = $(this).html(); } });
$pos_left = $pos.left+185;
if($cur_cc!=''){ $(".cate_layer").show().css("top",$pos.top+"px").css("left",$pos_left+"px").html($cur_html); } });
$(document).on("mouseenter",".cate2_menu .cate_more_ico",function(){ // 중하위메뉴 마우스오버용 추가 $(".cate2_layer").hide(); $cate2_code = $(this).closest("li").find("input[name='cate_code']").val(); $cur_cc = ""; $cur_html = ""; $pos = $(this).offset(); $(".cate3_menu").each(function(){ $sub_cc = $(this).find("input[name='cate_code']").val(); if($cate2_code==$sub_cc){ $cur_cc = $cate2_code; $cur_html = $(this).html(); } }); $pos_left = $pos.left+18; if($cur_cc!=''){ $(".cate2_layer").show().css("top",$pos.top+"px").css("left",$pos_left+"px").html($cur_html); } });
$(document).on("mouseenter",".cate2_layer",function(){ $("#cate2_mo").val("1"); });
$(document).on("mouseleave",".cate_layer",function(){ if($(".cate2_layer").css("display")=='none'){ $(".cate_layer").hide(); } });
$(document).on("mouseleave",".cate2_layer",function(){ if($("#cate2_mo").val()=='1'){ $(".cate2_layer").hide(); $("#cate2_mo").val("0"); } });
$(document).click(function(){ $(".cate_layer, .cate2_layer").hide(); });
$( ".menu01_pc_class" ).draggable({ drag:function(){ $(this).find("#hd_cate h3").addClass("bg_white"); } });
}); </script>
|