1 | $(function(){
|
2 |
|
3 |
|
4 | $(".hasSub").click(function(e){
|
5 | if($(this).hasClass("hover")){
|
6 | $(this).removeClass("hover").find(".topSub").hide();
|
7 | e.stopPropagation();
|
8 | }
|
9 | else{
|
10 | $(this).addClass("hover").find(".topSub").show();
|
11 | $(this).siblings().removeClass("hover").find(".topSub").hide();
|
12 | e.stopPropagation();
|
13 | }
|
14 | });
|
15 |
|
16 | $(".topSub").click(function(e){
|
17 | e.stopPropagation();
|
18 | });
|
19 |
|
20 |
|
21 |
|
22 | $(".slideDiv").click(function(){
|
23 | if($(".sideMenu > ul li").hasClass("current")===false){
|
24 | return;
|
25 | }
|
26 | if($(this).hasClass("on")){
|
27 | $(this).removeClass("on");
|
28 | $(".subMenu").animate({left:"-100px"},"fast");
|
29 | $(".rightCon").animate({"margin-left":"51px"},"fast");
|
30 | }
|
31 | else{
|
32 | $(".subMenu").animate({left:"51px"},"fast");
|
33 | $(".rightCon").animate({"margin-left":"200px"},"fast");
|
34 | $(this).addClass("on");
|
35 | }
|
36 | });
|
37 |
|
38 | if($(".sideMenu > ul li").hasClass("current")){
|
39 | var selId = $(".current").attr("rel");
|
40 | $(".subMenu ul#"+selId).css("display","block");
|
41 | $(".subMenu").css({left:"51px"});
|
42 | $(".rightCon").css({"margin-left":"200px"});
|
43 | $(".slideDiv").addClass("on");
|
44 | }
|
45 |
|
46 | var navi_idx = 0;
|
47 | $(".sideMenu > ul li").each(function(index, element) {
|
48 | $(element).mouseover(function(){
|
49 | $(".sideMenu").find("mark").css({"top":((index+1) * $(this).height())+"px","left":"0"});
|
50 | if($(this).hasClass("current")){
|
51 | $(".menubg").hide();
|
52 | }
|
53 | else{
|
54 | $(".slideDiv").css("border-right","1px solid #313541")
|
55 | $(".menubg").show();
|
56 | var selId = $(this).attr("rel");
|
57 | var appendHtml=$(".subMenu ul#"+selId).html();
|
58 | $(".menubg ul").html(appendHtml).show().find("a").removeClass("cur");
|
59 | };
|
60 | });
|
61 | $(".sideMenu").mouseleave(function(){
|
62 | $(".sideMenu").find("mark").css({"left":"-50px"});
|
63 | $(".slideDiv").css("border-right","1px solid #313541")
|
64 | $(".menubg").hide();
|
65 | });
|
66 | $(element).click(function(){
|
67 | $(".sideMenu").find("ul").find("li").removeClass("current");
|
68 | $(".subMenu ul").css("display","none");
|
69 | $(this).addClass("current");
|
70 | var selId = $(element).attr("rel");
|
71 | $(".subMenu ul#"+selId).css("display","block");
|
72 | $(".subMenu").css("left","51px");
|
73 | $(".rightCon").css("margin-left","200px");
|
74 | $(".slideDiv").addClass("on");
|
75 | $(".sideMenu").find("mark").css({"top":(index * $(this).height())+"px","left":"0"});
|
76 | navi_idx = index;
|
77 | });
|
78 | });
|
79 |
|
80 |
|
81 | |
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 | $(".subMenu li.hassub").click(function(){
|
95 | $(this).toggleClass("current");
|
96 | })
|
97 |
|
98 | $(".subMenu li dt a").click(function(e){
|
99 | e.stopPropagation();
|
100 | });
|
101 |
|
102 | $(".slide-icon").click(function(){
|
103 | if($(this).hasClass("open")){
|
104 | $(this).removeClass("open").next("ul").slideUp();
|
105 | }
|
106 | else{
|
107 | $(this).addClass("open").next("ul").slideDown();
|
108 | }
|
109 | })
|
110 |
|
111 | $('.circle').each(function() {
|
112 | var total=$(this).next(".num").find("i").text();
|
113 | var curNum=$(this).find('span').text();
|
114 | var num = 360/total*curNum;
|
115 | if (num<=180) {
|
116 | $(this).find('.rightArea').css('transform', "rotate(" + num + "deg)");
|
117 | } else {
|
118 | $(this).find('.rightArea').css('transform', "rotate(180deg)");
|
119 | $(this).find('.leftArea').css('transform', "rotate(" + (num - 180) + "deg)");
|
120 | };
|
121 | });
|
122 |
|
123 |
|
124 | $(".dropdown-btn").live("click",function(e){
|
125 | var _parent=$(this).parent();
|
126 | if(_parent.hasClass("open")){
|
127 | _parent.removeClass("open");
|
128 | }
|
129 | else{
|
130 | $(".select-box").removeClass("open");
|
131 | _parent.addClass("open");
|
132 | }
|
133 | e.stopPropagation();
|
134 | });
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 | $(".menu-pd").click(function(e){
|
142 | $(this).toggleClass("hover");
|
143 | e.stopPropagation();
|
144 | });
|
145 |
|
146 | $(document).click(function(e){
|
147 | $(".top-dropdown").parent().removeClass("open");
|
148 | $(".select-box").removeClass("open");
|
149 | $(".hasSub,.menu-pd").removeClass("hover");
|
150 | $(".topSub").hide();
|
151 | $(".tag-sub-layer").hide();
|
152 |
|
153 | });
|
154 |
|
155 |
|
156 |
|
157 | $(".filter").hover(function(){
|
158 | $(this).toggleClass("filterOpen");
|
159 | });
|
160 |
|
161 |
|
162 | |
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 | $("#chargeStyle .chargeText").click(function(){
|
174 | var curValue;
|
175 | $(this).addClass("chargeSel").find(".radio").addClass("radio-check");
|
176 | $(this).siblings().removeClass("chargeSel").find(".radio").removeClass("radio-check");
|
177 | curValue=$(this).find(".radio").attr("value");
|
178 | if(curValue==1){
|
179 | $("#price1").show();
|
180 | $("#price2").hide();
|
181 | $("#IP_type span").show();
|
182 | }
|
183 | else{
|
184 | $("#price1").hide();
|
185 | $("#price2").show();
|
186 | $("#IP_type span").eq(1).hide();
|
187 | }
|
188 | });
|
189 |
|
190 |
|
191 |
|
192 |
|
193 | $(".tips-icon,.tips-text").hover(function(){
|
194 | $(this).css("z-index","20");
|
195 | },function(){
|
196 | $(this).css("z-index","10");
|
197 | });
|
198 |
|
199 |
|
200 | $(".chargeText").hover(function(){
|
201 | $(this).next().addClass("hover").css("z-index","20");
|
202 | },function(){
|
203 | $(this).next().removeClass("hover").css("z-index","0");
|
204 | });
|
205 |
|
206 |
|
207 |
|
208 | $("#local span").click(function(){
|
209 | var self = $(this);
|
210 | if(!self.hasClass('not')){
|
211 | self.addClass("hover").siblings().removeClass("hover");
|
212 | }
|
213 | });
|
214 |
|
215 |
|
216 |
|
217 | $(".tag-filter").click(function(e){
|
218 | $(this).find(".tag-sub-layer").show();
|
219 | e.stopPropagation();
|
220 | });
|
221 |
|
222 | $(".parents-tag li").hover(function(){
|
223 | var selId=$(this).attr("rel");
|
224 | $(".sub-items ul").css("display","none");
|
225 | $(".sub-items ul#"+selId).css("display","block");
|
226 | });
|
227 |
|
228 | $(".tag-sub-layer ul li").click(function(){
|
229 | var cur_i = $(this).find("i");
|
230 | if(cur_i.is(":visible")){
|
231 | return;
|
232 | }
|
233 | else{
|
234 | $(this).find("i").show();
|
235 | $(".tag-box").append("<div class='tag'>"+$(this).text()+"<i></i></div>");
|
236 | }
|
237 | });
|
238 |
|
239 | $(".tag i").live('click',function(){
|
240 | $(this).parent().remove();
|
241 | });
|
242 |
|
243 | $(".log").mouseover(function(){
|
244 | $(this).addClass("hover");
|
245 | $(".log-show").animate({right:"0"},300);
|
246 | });
|
247 | $(".log-show").mouseleave(function(){
|
248 | $(this).animate({right:"-280px",},200);
|
249 | $(".log").removeClass("hover");
|
250 | });
|
251 |
|
252 |
|
253 | $(document).ready(function(){
|
254 | $('#message_mode > li').click(function(){
|
255 | var _this = $(this);
|
256 | $('.mess').hide();
|
257 | $('.mess'+_this.data('type')).show();
|
258 | });
|
259 | });
|
260 |
|
261 | });
|
262 |
|
263 |
|
264 |
|
265 | function setTab(name,cursel,n){
|
266 | for(i=1;i<=n;i++){
|
267 | var menu=document.getElementById(name+i);
|
268 | var con=document.getElementById("con-"+name+"-"+i);
|
269 | menu.className=i==cursel?"hover":"";
|
270 | con.style.display=i==cursel?"block":"none";
|
271 | }
|
272 | }
|
273 |
|