Showing
6 changed files
with
28 additions
and
735 deletions
web/js/channel/map.js
deleted
100644 → 0
1 | -/** | ||
2 | - * @fileOverview map页面JS | ||
3 | - * @author wei.wang@yoho.cn | ||
4 | - * @date 2014-05-21 | ||
5 | - */ | ||
6 | - | ||
7 | - var $ = jQuery = require("jquery"); | ||
8 | - require("../public"); | ||
9 | - require("../plugin/nicescroll"); | ||
10 | - var _ui=require("jquery-ui"); | ||
11 | - _ui($); | ||
12 | - require("jquery.imagesloaded"); | ||
13 | - initShopListHeight(); | ||
14 | - $(".city-list").niceScroll(); | ||
15 | - var currentZoom=0.85; | ||
16 | - var OriginalWidth=0,OriginalHeight=0,OriginalMarks={}; | ||
17 | - exports.init=function(){ | ||
18 | - | ||
19 | - $(".map-zoom").show(); | ||
20 | - OriginalWidth=$("#citymap-img").width(); | ||
21 | - OriginalHeight=$("#citymap-img").height(); | ||
22 | - $("#map-zoom-max").click(function(){zoomMax();}); | ||
23 | - $("#map-zoom-min").click(function(){zoomMin();}); | ||
24 | - $(".big-mark").each(function(index,obj){ | ||
25 | - var top=$(this).top(); | ||
26 | - var left=$(this).left(); | ||
27 | - OriginalMarks[$(this).attr("id")]={left:left,top:top}; | ||
28 | - }); | ||
29 | - $(window).bind("resize",function(){ | ||
30 | - initShopListHeight(); | ||
31 | - }); | ||
32 | - | ||
33 | - $(".shop").unbind("hover").hover( | ||
34 | - function(){ | ||
35 | - $("#citymap").stop(); | ||
36 | - $(".mark-tips").hide();//隐藏现有的气泡 | ||
37 | - moveShopToView(this); | ||
38 | - | ||
39 | - }, | ||
40 | - function(){ | ||
41 | - var shopId=$(this).id().replace("shoplist-","mark"); | ||
42 | - $("#"+shopId).find(".mark-tips").hide(); | ||
43 | - } | ||
44 | - ); | ||
45 | - $(".big-mark").hover( | ||
46 | - function(){$(this).find(".mark-tips").css("display","table");}, | ||
47 | - function(){$(this).find(".mark-tips").css("display","none");} | ||
48 | - ); | ||
49 | - $(".shop-name").click(function(){ | ||
50 | - var url=$(this).attr("src"); | ||
51 | - window.open(url); | ||
52 | - }); | ||
53 | - $(".big-mark").click(function(){ | ||
54 | - var href=$("a[val='"+$(this).attr("val")+"']").attr("src"); | ||
55 | - window.open(href); | ||
56 | - }); | ||
57 | - | ||
58 | - | ||
59 | - var bodyHeight = document.body.clientHeight - 177; | ||
60 | - $(".map-city-content").height(bodyHeight); | ||
61 | - $(window).bind("resize", function() | ||
62 | - { | ||
63 | - var bodyHeight = document.body.clientHeight - 177; | ||
64 | - $(".map-city-content").height(bodyHeight); | ||
65 | - $("#citymap-img").width($("#citymap").width()); | ||
66 | - $("#citymap-img").height($("#citymap").height()); | ||
67 | - }); | ||
68 | - $("#citymap-img").imagesLoaded(function() | ||
69 | - { | ||
70 | - $(this).width("100%").height("100%"); | ||
71 | - $("#citymap").css({width: $(this).width(), height: $(this).height(), position: "relative"}).draggable({ | ||
72 | - drag: function() {}, | ||
73 | - stop: function() { | ||
74 | - mapRevert(this); | ||
75 | - } | ||
76 | - }); | ||
77 | - }); | ||
78 | - var isMouseDown = false; | ||
79 | - | ||
80 | - | ||
81 | - }; | ||
82 | - function initShopListHeight(){ | ||
83 | - var currentWidth=document.body.clientWidth; | ||
84 | - if(currentWidth>=1190) | ||
85 | - { | ||
86 | - $(".city-list").height(document.body.clientHeight-310); | ||
87 | - } | ||
88 | - else if(currentWidth<1190&¤tWidth>769) | ||
89 | - { | ||
90 | - $(".city-list").height(document.body.clientHeight-260); | ||
91 | - } | ||
92 | - else if(currentWidth<=768) | ||
93 | - { | ||
94 | - $(".city-list").height(document.body.clientHeight-178); | ||
95 | - } | ||
96 | - } | ||
97 | - /*在商店上显示tips*/ | ||
98 | - function shopShowTips(obj){ | ||
99 | - var shopId=$(obj).id().replace("shoplist-","mark"); | ||
100 | - $("#"+shopId).find(".mark-tips").show(); | ||
101 | - } | ||
102 | - /*如果店铺不在当前视野范围内,则移动到当前范围*/ | ||
103 | - function moveShopToView(obj){ | ||
104 | - | ||
105 | - var contentHeight=$(".map-city-content").height(); | ||
106 | - var contentWidth=document.body.clientWidth; | ||
107 | - var shopId=$(obj).id().replace("shoplist-","mark"); | ||
108 | - var top=$("#"+shopId).offset().top; | ||
109 | - var left=$("#"+shopId).offset().left; | ||
110 | - var absoluteTop=0; | ||
111 | - var absoluteLeft=0;//$("#"+shopId).offset().left+$("#citymap").left(); | ||
112 | - if ($("#"+shopId).css("top").indexOf("%")>0) { | ||
113 | - absoluteTop=parseFloat($("#"+shopId).css("top").replace("%",""))/100*$("#citymap").height(); | ||
114 | - absoluteLeft=parseFloat($("#"+shopId).css("left").replace("%",""))/100*$("#citymap").width(); | ||
115 | - } | ||
116 | - else | ||
117 | - { | ||
118 | - absoluteTop=$("#"+shopId).top(); | ||
119 | - absoluteLeft=$("#"+shopId).left(); | ||
120 | - } | ||
121 | - | ||
122 | - var location=getScreenCenter(); | ||
123 | - | ||
124 | - if(top<304&&top>0||top<0|| | ||
125 | - top+177>document.body.clientHeight | ||
126 | - ||left<$(".city-list").width() | ||
127 | - ||left>document.body.clientWidth | ||
128 | - ) | ||
129 | - { | ||
130 | - var toTop=location.y-absoluteTop; | ||
131 | - var toLeft=location.x-absoluteLeft; | ||
132 | - if (toLeft>$(".city-list").width()) { | ||
133 | - toLeft=$(".city-list").width(); | ||
134 | - | ||
135 | - } | ||
136 | - if (toTop>190) { | ||
137 | - toTop=190; | ||
138 | - } | ||
139 | - $("#citymap").animate({top:toTop,left:toLeft},500,function(){ | ||
140 | - $("#"+shopId).find(".mark-tips").show(); | ||
141 | - }); | ||
142 | - } | ||
143 | - else | ||
144 | - { | ||
145 | - $("#"+shopId).find(".mark-tips").show(); | ||
146 | - } | ||
147 | - } | ||
148 | - function zoom(){ | ||
149 | - var width=OriginalWidth*currentZoom; | ||
150 | - var height=OriginalHeight*currentZoom; | ||
151 | - $("#citymap").width(width); | ||
152 | - $("#citymap").height(height); | ||
153 | - } | ||
154 | - function zoomMax(){ | ||
155 | - if(currentZoom>=1) | ||
156 | - { | ||
157 | - return; | ||
158 | - } | ||
159 | - currentZoom=currentZoom+0.05; | ||
160 | - zoom(); | ||
161 | - } | ||
162 | - function zoomMin(){ | ||
163 | - if(currentZoom<=0.7) | ||
164 | - { | ||
165 | - return; | ||
166 | - } | ||
167 | - currentZoom=currentZoom-0.05; | ||
168 | - | ||
169 | - | ||
170 | - zoom(); | ||
171 | - } | ||
172 | - function mapRevert(obj) | ||
173 | - { | ||
174 | - var top = parseFloat($(obj).css("top").replace("px", "")); | ||
175 | - var left = parseFloat($(obj).css("left").replace("px", "")); | ||
176 | - var contentHeight = $(".map-city-content").height(); | ||
177 | - var contentWidth = document.body.clientWidth; | ||
178 | - var bottom = contentHeight - top - $(obj).height(); | ||
179 | -// var right = contentWidth - left - parseFloat($(obj).width()); | ||
180 | -// var rightForbid = contentWidth - $(".city-shop-list").width(); | ||
181 | - if (top > 120 && bottom < 0) | ||
182 | - { | ||
183 | - $(obj).animate({top: 120}, 500); | ||
184 | - } | ||
185 | - if (bottom > 0 && top < 120) | ||
186 | - { | ||
187 | - $(obj).animate({top: contentHeight - $(obj).height()}, 500); | ||
188 | - } | ||
189 | - if (left + $(obj).width() <= $(".city-shop-list").width()) | ||
190 | - { | ||
191 | - $(obj).animate({left: contentWidth - $(obj).width()}, 500); | ||
192 | - } | ||
193 | - if (left > contentWidth) | ||
194 | - { | ||
195 | - $(obj).animate({left: contentWidth - $(obj).width()}, 500); | ||
196 | - } | ||
197 | - } | ||
198 | - function getScreenCenter(){ | ||
199 | - var width=document.body.clientWidth; | ||
200 | - var height=document.body.clientHeight; | ||
201 | - var _left=(width-$(".city-shop-list").width())/2+$(".city-shop-list").width(); | ||
202 | - var _headerHeight=$("#maxEnterprise").height()-$(".enterprise-header").height()-12; | ||
203 | - var _top=$(".map-city-content").height()/2; | ||
204 | - //$("<span/>").css({position:"absolute",display:"block",width:20,height:20,"z-index":20,background:"#f00",left:_left,top:_top}).appendTo(document.body); | ||
205 | - return {x:_left,y:_top}; | ||
206 | - } |
web/js/channel/map_pad.js
deleted
100644 → 0
1 | -/** | ||
2 | - * @fileOverview 首页JS | ||
3 | - * @author wei.wang@yoho.cn | ||
4 | - * @date 2014-05-21 | ||
5 | - */ | ||
6 | - | ||
7 | - var $=require("jquery"); | ||
8 | - //require("lib/ui/touch"); | ||
9 | - //require("lib/util/jquery.hammer"); | ||
10 | - require("../public"); | ||
11 | - require("jquery.imagesloaded"); | ||
12 | - var currentZoom=0.85; | ||
13 | - var OriginalWidth=0,OriginalHeight=0,OriginalMarks={}; | ||
14 | - window.onresize=function(){ | ||
15 | - initShopListHeight(); | ||
16 | - var bodyWidth=document.body.clientWidth; | ||
17 | - $("#citymap").width(bodyWidth-$(".city-shop-list").width()); | ||
18 | - var contentWidth = $(".map-city-content").width(); | ||
19 | - var currentLeft=parseFloat(contentWidth-$("#citymap").width()); | ||
20 | - | ||
21 | - $("#citymap").css({"left":currentLeft,top:0}); | ||
22 | - } | ||
23 | - exports.init=function(){ | ||
24 | - initShopListHeight(); | ||
25 | - | ||
26 | - $(".city-list").find("div").niceScroll(); | ||
27 | - $(document.body).css({overflow:"hidden"}); | ||
28 | - var bodyWidth=document.body.clientWidth; | ||
29 | - $("#citymap-img").imagesLoaded(function() | ||
30 | - { | ||
31 | - $(this).width("100%").height("100%"); | ||
32 | - }); | ||
33 | - $(".shop").hover( | ||
34 | - function(){ | ||
35 | - $(".mark-tips").hide(); | ||
36 | - var shopId=$(this).id().replace("shoplist-","mark"); | ||
37 | - var shopObj=$("#"+shopId); | ||
38 | - var top=0; | ||
39 | - var left=0; | ||
40 | - var _top=parseFloat($("#"+shopId)[0].style.top.replace("%","")); | ||
41 | - var _left=parseFloat($("#"+shopId)[0].style.left.replace("%","")); | ||
42 | - top=_top/100*$("#citymap").height(); | ||
43 | - left=_left/100*$("#citymap").width(); | ||
44 | - | ||
45 | - console.log(top,left); | ||
46 | - console.log(bodyWidth-shopObj.offset().left); | ||
47 | - if(top<120&&left<250){ | ||
48 | - //显示在右下角 | ||
49 | - | ||
50 | - $("#"+shopId).find(".mark-tips").attr("class","mark-tips left-bottom"); | ||
51 | - } | ||
52 | - else if(top>120&&left<250) | ||
53 | - { | ||
54 | - //显示在右上角 | ||
55 | - | ||
56 | - $("#"+shopId).find(".mark-tips").attr("class","mark-tips left"); | ||
57 | - } | ||
58 | - else if(top<120&&left>250&&bodyWidth-shopObj.offset().left>250) | ||
59 | - { | ||
60 | - //显示在左下角 | ||
61 | - | ||
62 | - $("#"+shopId).find(".mark-tips").attr("class","mark-tips left-bottom"); | ||
63 | - } | ||
64 | - else if (top<120&&left>250&&bodyWidth-shopObj.offset().left<250) { | ||
65 | - $("#"+shopId).find(".mark-tips").attr("class","mark-tips right-bottom"); | ||
66 | - } | ||
67 | - else if(top>120&&left>250&&bodyWidth-shopObj.offset().left>250) | ||
68 | - { | ||
69 | - //显示在左角 | ||
70 | - $("#"+shopId).find(".mark-tips").attr("class","mark-tips left"); | ||
71 | - } | ||
72 | - else if(top>120&&left>250&&bodyWidth-shopObj.offset().left<250) | ||
73 | - { | ||
74 | - //显示在左角 | ||
75 | - $("#"+shopId).find(".mark-tips").attr("class","mark-tips right"); | ||
76 | - } | ||
77 | - $("#"+shopId).find(".mark-tips").show().unbind().click(function(){ | ||
78 | - var href=$("a[val='"+$(this).parent().attr("val")+"']").attr("src"); | ||
79 | - window.open(href); | ||
80 | - | ||
81 | - }); | ||
82 | - | ||
83 | - | ||
84 | - }, | ||
85 | - function(){ | ||
86 | - var shopId=$(this).id().replace("shoplist-","mark"); | ||
87 | - } | ||
88 | - ); | ||
89 | - $("#citymap-img").width("100%").height("100%"); | ||
90 | - | ||
91 | - var bodyHeight = document.body.clientHeight - 177; | ||
92 | - $(".map-city-content").height(bodyHeight); | ||
93 | - $("#citymap").width(bodyWidth-$(".city-shop-list").width()); | ||
94 | - var contentWidth = $(".map-city-content").width(); | ||
95 | - var currentLeft=parseFloat(contentWidth-$("#citymap").width()); | ||
96 | - | ||
97 | - $("#citymap").css({"left":currentLeft,top:0}); | ||
98 | - var currentTop=parseFloat($("#citymap").css("top").replace("px","")); | ||
99 | - | ||
100 | - }; | ||
101 | - | ||
102 | - function initShopListHeight(){ | ||
103 | - var currentWidth=document.body.clientWidth; | ||
104 | - | ||
105 | - if(currentWidth>=1190) | ||
106 | - { | ||
107 | - $(".city-list").height(document.body.clientHeight-310); | ||
108 | - } | ||
109 | - else if(currentWidth<1190&¤tWidth>=769) | ||
110 | - { | ||
111 | - $(".city-list").height(document.body.clientHeight-260); | ||
112 | - } | ||
113 | - else if(currentWidth<=768) | ||
114 | - { | ||
115 | - $(".city-list").height(document.body.clientHeight-268); | ||
116 | - } | ||
117 | - } |
web/js/map/list.js
deleted
100644 → 0
1 | -/** | ||
2 | - * @fileOverview 地图列表 | ||
3 | - * @author feiker <fei.hong@yoho.cn> | ||
4 | - * @date 2013-06-04 | ||
5 | - */ | ||
6 | - | ||
7 | - var $ = require('jquery'); | ||
8 | - require('yoho.easing'); | ||
9 | - require('jquery.imagesloaded'); | ||
10 | - require('jquery.pin'); | ||
11 | - require('jquery-ui'); | ||
12 | - require('jquery.ui.touch-punch'); | ||
13 | - require('jquery.wresize'); | ||
14 | - $("#map-pannel").css({"background":"#fff",height:"300px"}).pin({containerSelector: ".wrapper"}); | ||
15 | - | ||
16 | - $(".hot-area").mouseover(function(){ | ||
17 | - $(this).find(".background").show(); | ||
18 | - $(this).find(".china-area").show(); | ||
19 | - }); | ||
20 | - $(window).scroll(function() | ||
21 | - { | ||
22 | - var height = $(".page-head").height(); | ||
23 | - $("#map-pannel").css({"top":height+"px"}); | ||
24 | - }); | ||
25 | - var mapW = $(".grid-city-map").width(); | ||
26 | - | ||
27 | - $(".background").on("click",function(){ | ||
28 | - $(this).hide(); | ||
29 | - $(".china-area").hide(); | ||
30 | - }); | ||
31 | - if($(".grid-city-map #map").length) | ||
32 | - { | ||
33 | - //页面图加载完成 | ||
34 | - $(".grid-city-map #map").imagesLoaded(function() | ||
35 | - { | ||
36 | - $(".handle").show().mousedown(function() | ||
37 | - { | ||
38 | - $(this).addClass('grabbing'); | ||
39 | - }).mouseup(function() | ||
40 | - { | ||
41 | - $(this).removeClass('grabbing');; | ||
42 | - }); | ||
43 | - //hover到店铺列表后的地图移动和tip展示 | ||
44 | - | ||
45 | - var timeoutHandle= null; | ||
46 | - $(".map-shop-list .shop-name").hover(function() | ||
47 | - { | ||
48 | - var self = $(this); | ||
49 | - window.clearTimeout(timeoutHandle); | ||
50 | - timeoutHandle = window.setTimeout(function() | ||
51 | - { | ||
52 | - showTip(self.attr("val"),this); | ||
53 | - $("#"+self.attr("val")).css({"z-index":1000}); | ||
54 | - },650); | ||
55 | - | ||
56 | - },function() | ||
57 | - { | ||
58 | - $(".mark-tip").fadeOut('fast'); | ||
59 | - $("#"+$(this).attr("val")).css({"z-index":3}); | ||
60 | - }); | ||
61 | - | ||
62 | - //鼠标移到建筑物展示tip | ||
63 | - var setime = null; | ||
64 | - var tip_clone = null; | ||
65 | - $(".grid-city-map .mark").hover(function() | ||
66 | - { | ||
67 | - // window.clearTimeout(setime); | ||
68 | - var id = $(this).attr("val"); | ||
69 | - $(this).find(".mark-tip").show(); | ||
70 | - var pos = $("#"+id).position(); | ||
71 | - var tipPos = pos.left>$(".grid-city-map").width()/2?"left":"right"; | ||
72 | - $("#"+id).find(".mark-tip").attr("class","mark-tip "+tipPos); | ||
73 | - $("#"+id).css({"z-index":1000}); | ||
74 | - var distance = $("#"+id).find(".mark-tip").offset(); | ||
75 | - tip_clone = $("#"+id).find(".mark-tip").hide().clone(); | ||
76 | - //$(this).parent().append(tip_clone); | ||
77 | - $("body").append(tip_clone); | ||
78 | - var top=parseInt($("#"+id).css("top").replace("px",""))-parseInt(tip_clone.css("height").replace("px","")); | ||
79 | - | ||
80 | - var left=parseInt($("#"+id).css("left").replace("px",""))-parseInt(tip_clone.css("width").replace("px","")); | ||
81 | - tip_clone.attr("id", id+"_clone").css({"position": "fixed", | ||
82 | - "top": distance.top+"px", | ||
83 | - "left": distance.left+"px", | ||
84 | - "z-index": 1000000}).show(); | ||
85 | - | ||
86 | - // 鼠标移动到克隆的mark-tip触发的事件 | ||
87 | - $("#"+id+"_clone").hover(function(){ | ||
88 | - window.clearTimeout(setime); //鼠标划过的时候清除延迟(即清除setime这个函数); | ||
89 | - }, function(){ | ||
90 | - $(this).fadeOut("fast"); | ||
91 | - $(this).remove(); | ||
92 | - }); | ||
93 | - },function() | ||
94 | - { | ||
95 | - var self = $(this); | ||
96 | - setime = setTimeout(function(){ | ||
97 | - var clone = $("#"+self.attr("val")+"_clone"); | ||
98 | - | ||
99 | - clone.fadeOut("fast"); | ||
100 | - clone.remove(); | ||
101 | - }, 50); | ||
102 | - $("#"+$(this).attr("val")).css({"z-index":3}); | ||
103 | - }); | ||
104 | - | ||
105 | - | ||
106 | - //打开该店铺 | ||
107 | - $(".grid-city-map .mark img").click(function() | ||
108 | - { | ||
109 | - var id = $(this).parent('.mark').attr("id"); | ||
110 | - var href = $(".map-shop-list a[val='"+id+"']").attr("href"); | ||
111 | - //window.location.href = href; | ||
112 | - window.open(href); | ||
113 | - }); | ||
114 | - | ||
115 | - initMap(); | ||
116 | - $(".handle").draggable({ axis: "y",containment:"parent"}); | ||
117 | - }); | ||
118 | - | ||
119 | - function initMap() | ||
120 | - { | ||
121 | - //设置地图面板的高宽 | ||
122 | - var mapH = $("#map")[0].clientHeight; | ||
123 | - var mapW = $("#map")[0].clientWidth; | ||
124 | - $(".grid-city-map").height(mapH); | ||
125 | - $("#map-pannel").width(mapW); | ||
126 | - | ||
127 | - //初始化坐标位置 | ||
128 | - $(".grid-city-map .mark").each(function() | ||
129 | - { | ||
130 | - var w = $(this).attr('left')/10000; | ||
131 | - var h = $(this).attr('top')/10000; | ||
132 | - $(this).css({left:(mapW*w)+"px",top:(mapH*h)+"px"}); | ||
133 | - }); | ||
134 | - | ||
135 | - //设置拖拽 | ||
136 | - var ch = $(".map-hide").height(); | ||
137 | - $("#drag-pannel").width(mapW).height(mapH*2-ch+161).css({"position":"absolute","top":(ch-mapH)+"px"}); | ||
138 | - $(".handle").css({"top":(mapH-ch)+"px"}); | ||
139 | - } | ||
140 | - | ||
141 | - $(window).resize(initMap); | ||
142 | - | ||
143 | - //展示tip和移动 | ||
144 | - function showTip(id,obj) | ||
145 | - { | ||
146 | - $(".mark-tip").hide(); | ||
147 | - var pos = $("#"+id).position(); | ||
148 | - var height = $("#"+id).height(); | ||
149 | - var tipHeight = 161; | ||
150 | - var cur = (420-(height+161))/2+tipHeight; | ||
151 | - var num = cur-pos.top; | ||
152 | - var tipPos = pos.left>$(".grid-city-map").width()/2?"left":"right"; | ||
153 | - $("#"+id).find(".mark-tip").attr("class","mark-tip "+tipPos); | ||
154 | - var ch = $(".map-hide").height(); | ||
155 | - var mapH = $("#map").height(); | ||
156 | - num=num+(mapH-ch); | ||
157 | - if(num==0) | ||
158 | - { | ||
159 | - return; | ||
160 | - } | ||
161 | - //设置移动和动画 | ||
162 | - $(".grid-city-map").stop( true, true ).animate({"top":num+"px"},200,"easeOutExpo",function() | ||
163 | - { | ||
164 | - $("#"+id).stop( true, true ).animate({"top":"-=40px"},100,"easeOutQuart") | ||
165 | - .animate({"top":"+=40px"},300,"easeOutBounce",function() | ||
166 | - { | ||
167 | - $(".mark-tip").hide(); | ||
168 | - $(this).find(".mark-tip").show(); | ||
169 | - }); | ||
170 | - }); | ||
171 | - } | ||
172 | - $(".parent-nav li").css({"cursor":"pointer"}); | ||
173 | - $(".parent-nav li").click(function() | ||
174 | - { | ||
175 | - window.location.href = $(this).find("a").attr("href"); | ||
176 | - }); | ||
177 | - } | ||
178 | - | ||
179 | - //导航切换分页 | ||
180 | - var offset = 0; | ||
181 | - var limit = 9; | ||
182 | - function navMove(num) | ||
183 | - { | ||
184 | - if((offset==0&&num<0)||(num>0&&offset+limit>=$(".sub-nav:eq(1) li").length)) | ||
185 | - { | ||
186 | - return; | ||
187 | - } | ||
188 | - offset+=num; | ||
189 | - $(".sub-nav:eq(1) li").hide(); | ||
190 | - $(".sub-nav:eq(1) li").each(function() | ||
191 | - { | ||
192 | - var index = $(".sub-nav:eq(1) li").index(this); | ||
193 | - if(index>=offset&&index<(offset+limit)) | ||
194 | - { | ||
195 | - $(this).show(); | ||
196 | - } | ||
197 | - }); | ||
198 | - if((num>0&&offset+limit>=$(".sub-nav:eq(1) li").length)) | ||
199 | - { | ||
200 | - $(".sub-nav:eq(2) span").removeClass("click"); | ||
201 | - } | ||
202 | - else | ||
203 | - { | ||
204 | - $(".sub-nav:eq(2) span").addClass("click"); | ||
205 | - } | ||
206 | - if((offset==0&&num<0)) | ||
207 | - { | ||
208 | - $(".sub-nav:eq(0) span").removeClass("click"); | ||
209 | - } | ||
210 | - else | ||
211 | - { | ||
212 | - $(".sub-nav:eq(0) span").addClass("click"); | ||
213 | - } | ||
214 | - } | ||
215 | - $(".sub-nav:eq(0) span").click(function() | ||
216 | - { | ||
217 | - navMove(-limit); | ||
218 | - }); | ||
219 | - $(".sub-nav:eq(2) span").click(function() | ||
220 | - { | ||
221 | - navMove(limit); | ||
222 | - }); | ||
223 | - | ||
224 | - //首页的行为 | ||
225 | - $(".big-mark").hover(function() | ||
226 | - { | ||
227 | - $(this).css({'z-index':1000}); | ||
228 | - if(Number(this.style.left.replace("%",""))<50) | ||
229 | - { | ||
230 | - $(this).find(".mark-tip").attr("class","mark-tip rights"); | ||
231 | - } | ||
232 | - $(this).find(".mark-tip").fadeIn('fast'); | ||
233 | - },function() | ||
234 | - { | ||
235 | - $(this).find(".mark-tip").fadeOut('fast'); | ||
236 | - $(this).css({'z-index':2}); | ||
237 | - }); | ||
238 | - $(".big-mark").click(function() | ||
239 | - { | ||
240 | - window.location.href = $(this).attr("url"); | ||
241 | - }); | ||
242 | - function setDrag() | ||
243 | - { | ||
244 | - //$(".wrapper").css({"width":"100%"}); | ||
245 | - var w = $(".gird-map-pan").width(); | ||
246 | - var maxW = $("#drag_handle").width(); | ||
247 | - var left = $(".gird-map-pan").offset().left; | ||
248 | - //$("#drag_handle").draggable({ axis: "x",containment:[(w-maxW+left),0,left,0]}); | ||
249 | - //$("#drag_handle").css({"left":((w-maxW)/2)+"px"}); | ||
250 | - if(w<1320) | ||
251 | - { | ||
252 | - $("#drag_handle").width(980).height(486); | ||
253 | - $("#Map-area area").attr("coords","684,203,640,236,669,264,711,285,730,296,755,286,767,289,769,277,773,237,782,234,792,226,799,216,801,203,797,191,767,191,755,210,747,218,717,226"); | ||
254 | - } | ||
255 | - else | ||
256 | - { | ||
257 | - $("#drag_handle").width(1320).height(654); | ||
258 | - $("#Map-area area").attr("coords","900,271,863,313,886,345,927,359,946,379,971,370,986,385,1024,362,1033,339,1027,321,1039,305,1056,292,1045,264,1025,258,1005,278,983,294,968,299,934,295"); | ||
259 | - } | ||
260 | - $(".footer").css({"margin-top":"20px"}); | ||
261 | - } | ||
262 | - if($("#drag_handle").length>0) | ||
263 | - { | ||
264 | - $(window).resize(setDrag); | ||
265 | - setDrag(); | ||
266 | - } | ||
267 | - var flag = null; | ||
268 | - $("#Map-area area").hover(function() | ||
269 | - { | ||
270 | - $("#china-map").show(); | ||
271 | - $("#drag_handle").css({'opacity':'0.4'}); | ||
272 | - },function() | ||
273 | - { | ||
274 | - flag = window.setTimeout(function() | ||
275 | - { | ||
276 | - $("#china-map").hide(); | ||
277 | - $("#drag_handle").css({'opacity':'1'}); | ||
278 | - },0); | ||
279 | - }); | ||
280 | - $("#china-map").hover(function() | ||
281 | - { | ||
282 | - window.clearTimeout(flag); | ||
283 | - $("#china-map").show(); | ||
284 | - $("#drag_handle").css({'opacity':'0.4'}); | ||
285 | - },function() | ||
286 | - { | ||
287 | - $("#china-map").hide(); | ||
288 | - $("#drag_handle").css({'opacity':'1'}); | ||
289 | - }); |
@@ -5,10 +5,6 @@ | @@ -5,10 +5,6 @@ | ||
5 | */ | 5 | */ |
6 | window.tmp$ = null; | 6 | window.tmp$ = null; |
7 | var $ = require('jquery'); | 7 | var $ = require('jquery'); |
8 | -window.tmp$ = $; | ||
9 | -<<<<<<< HEAD | ||
10 | -var Swiper = require("yoho.swiper"); | ||
11 | -require('./plugin/lazyloadImage'); | ||
12 | $(".lazy").lazyload(); | 8 | $(".lazy").lazyload(); |
13 | $.fn.top = function() { | 9 | $.fn.top = function() { |
14 | if (arguments.length > 0) { | 10 | if (arguments.length > 0) { |
@@ -27,13 +23,12 @@ $.fn.left = function() { | @@ -27,13 +23,12 @@ $.fn.left = function() { | ||
27 | return parseFloat($(this).css("left").replace("px", "")); | 23 | return parseFloat($(this).css("left").replace("px", "")); |
28 | } | 24 | } |
29 | }; | 25 | }; |
30 | -======= | 26 | + |
31 | require("lazyload"); | 27 | require("lazyload"); |
32 | var Swiper = require("yoho-idangerous.swiper"); | 28 | var Swiper = require("yoho-idangerous.swiper"); |
33 | $(".lazy").lazyload(); | 29 | $(".lazy").lazyload(); |
34 | 30 | ||
35 | //扩展jquery================================================================= | 31 | //扩展jquery================================================================= |
36 | ->>>>>>> ww_develop | ||
37 | $.fn.id = function() { | 32 | $.fn.id = function() { |
38 | if (arguments.length > 0) { | 33 | if (arguments.length > 0) { |
39 | $(this).attr("id", arguments[0]); | 34 | $(this).attr("id", arguments[0]); |
@@ -46,21 +41,12 @@ $.fn.id = function() { | @@ -46,21 +41,12 @@ $.fn.id = function() { | ||
46 | //banner======================================================================================================== | 41 | //banner======================================================================================================== |
47 | if ($(".swiper-container").find(".swiper-slide").length > 1) { | 42 | if ($(".swiper-container").find(".swiper-slide").length > 1) { |
48 | var mySwiper = new Swiper('.swiper-container', { | 43 | var mySwiper = new Swiper('.swiper-container', { |
49 | -<<<<<<< HEAD | ||
50 | pagination: '.pagination-banner', | 44 | pagination: '.pagination-banner', |
51 | loop: true, | 45 | loop: true, |
52 | autoplay: 5000, | 46 | autoplay: 5000, |
53 | grabCursor: true, | 47 | grabCursor: true, |
54 | paginationClickable: true, | 48 | paginationClickable: true, |
55 | autoStopPlay: false | 49 | autoStopPlay: false |
56 | -======= | ||
57 | - pagination : '.pagination-banner', | ||
58 | - loop : true, | ||
59 | - autoplay : 5000, | ||
60 | - grabCursor : true, | ||
61 | - paginationClickable : true, | ||
62 | - autoStopPlay : false | ||
63 | ->>>>>>> ww_develop | ||
64 | }); | 50 | }); |
65 | $('.arrow-left').on('click', function(e) { | 51 | $('.arrow-left').on('click', function(e) { |
66 | e.preventDefault(); | 52 | e.preventDefault(); |
@@ -74,23 +60,20 @@ if ($(".swiper-container").find(".swiper-slide").length > 1) { | @@ -74,23 +60,20 @@ if ($(".swiper-container").find(".swiper-slide").length > 1) { | ||
74 | 60 | ||
75 | //============================================================================================================== | 61 | //============================================================================================================== |
76 | 62 | ||
77 | -<<<<<<< HEAD | ||
78 | -======= | ||
79 | //centerbanner============================================================================= | 63 | //centerbanner============================================================================= |
80 | var bannerSwiper = new Swiper('.swiper-container2', { | 64 | var bannerSwiper = new Swiper('.swiper-container2', { |
81 | - pagination : '.pagination-adv', | ||
82 | - loop : true, | ||
83 | - autoplay : 2000, | ||
84 | - autoStopPlay : false, | ||
85 | - paginationClickable : true, | ||
86 | - onSlideChangeEnd : function() { | 65 | + pagination: '.pagination-adv', |
66 | + loop: true, | ||
67 | + autoplay: 2000, | ||
68 | + autoStopPlay: false, | ||
69 | + paginationClickable: true, | ||
70 | + onSlideChangeEnd: function() { | ||
87 | bannerSwiper.startAutoplay(); | 71 | bannerSwiper.startAutoplay(); |
88 | $(".swiper-container2 .lazy").lazyload(); | 72 | $(".swiper-container2 .lazy").lazyload(); |
89 | } | 73 | } |
90 | }); | 74 | }); |
91 | //================================================================================================ | 75 | //================================================================================================ |
92 | 76 | ||
93 | ->>>>>>> ww_develop | ||
94 | $(".getapp").hover(function() { | 77 | $(".getapp").hover(function() { |
95 | $(this).find(".bitmap").show(); | 78 | $(this).find(".bitmap").show(); |
96 | $("img").lazyload(); | 79 | $("img").lazyload(); |
@@ -113,22 +96,12 @@ $(".li-weixin").mouseover(function() { | @@ -113,22 +96,12 @@ $(".li-weixin").mouseover(function() { | ||
113 | $(".li-weixin").click(function() { | 96 | $(".li-weixin").click(function() { |
114 | return false; | 97 | return false; |
115 | }); | 98 | }); |
116 | -<<<<<<< HEAD | ||
117 | -$("#maxEnterprise").click(function() { | ||
118 | - $(".bitmap").hide(); | ||
119 | - $(".pop").hide(); | ||
120 | -}); | ||
121 | -$("#minEnterprise").click(function() { | ||
122 | - $(".bitmap").hide(); | ||
123 | - $(".pop").hide(); | ||
124 | -}); | ||
125 | -======= | ||
126 | ->>>>>>> ww_develop | 99 | + |
127 | $(".content").click(function() { | 100 | $(".content").click(function() { |
128 | $(".bitmap").hide(); | 101 | $(".bitmap").hide(); |
129 | $(".pop").hide(); | 102 | $(".pop").hide(); |
130 | }); | 103 | }); |
131 | -<<<<<<< HEAD | 104 | + |
132 | //企业滚动效果====================================================================================================== | 105 | //企业滚动效果====================================================================================================== |
133 | var minMenuHasShow = false; //小导航是否显示 | 106 | var minMenuHasShow = false; //小导航是否显示 |
134 | var isTop = true; //滚动条是否在顶部 | 107 | var isTop = true; //滚动条是否在顶部 |
@@ -211,33 +184,22 @@ if (document.body.scrollTop > 0 && isTop === true) { | @@ -211,33 +184,22 @@ if (document.body.scrollTop > 0 && isTop === true) { | ||
211 | }, 200); | 184 | }, 200); |
212 | isTop = true; | 185 | isTop = true; |
213 | } | 186 | } |
214 | -======= | ||
215 | ->>>>>>> ww_develop | 187 | + |
216 | 188 | ||
217 | //回到顶部按钮====================================================================================================== | 189 | //回到顶部按钮====================================================================================================== |
218 | $(".return-to-top").click(function() { | 190 | $(".return-to-top").click(function() { |
219 | $("html,body").animate({ | 191 | $("html,body").animate({ |
220 | -<<<<<<< HEAD | ||
221 | scrollTop: 0 | 192 | scrollTop: 0 |
222 | }, 300, function() { | 193 | }, 300, function() { |
223 | $(".return-to-top").animate({ | 194 | $(".return-to-top").animate({ |
224 | "filter": "alpha(opacity=0)", | 195 | "filter": "alpha(opacity=0)", |
225 | "-moz-opacity": "0", | 196 | "-moz-opacity": "0", |
226 | opacity: "0" | 197 | opacity: "0" |
227 | -======= | ||
228 | - scrollTop : 0 | ||
229 | - }, 300, function() { | ||
230 | - $(".return-to-top").animate({ | ||
231 | - "filter" : "alpha(opacity=0)", | ||
232 | - "-moz-opacity" : "0", | ||
233 | - opacity : "0" | ||
234 | ->>>>>>> ww_develop | ||
235 | }, 200); | 198 | }, 200); |
236 | }); | 199 | }); |
237 | }); | 200 | }); |
238 | //=============================================================================================================== | 201 | //=============================================================================================================== |
239 | 202 | ||
240 | -<<<<<<< HEAD | ||
241 | 203 | ||
242 | 204 | ||
243 | //子菜单交互======================================================================================================== | 205 | //子菜单交互======================================================================================================== |
@@ -255,8 +217,6 @@ function createSubMenu(info) { | @@ -255,8 +217,6 @@ function createSubMenu(info) { | ||
255 | } | 217 | } |
256 | //================================================================================================================ | 218 | //================================================================================================================ |
257 | 219 | ||
258 | - | ||
259 | -======= | ||
260 | //子菜单交互======================================================================================================== | 220 | //子菜单交互======================================================================================================== |
261 | function createSubMenu(info) { | 221 | function createSubMenu(info) { |
262 | var data = {}; | 222 | var data = {}; |
@@ -267,7 +227,7 @@ function createSubMenu(info) { | @@ -267,7 +227,7 @@ function createSubMenu(info) { | ||
267 | } | 227 | } |
268 | 228 | ||
269 | //================================================================================================================ | 229 | //================================================================================================================ |
270 | ->>>>>>> ww_develop | 230 | + |
271 | 231 | ||
272 | //频道页、首页碎片交互================================================================================================= | 232 | //频道页、首页碎片交互================================================================================================= |
273 | //mulLine.init(); | 233 | //mulLine.init(); |
@@ -277,21 +237,12 @@ function dealItems() { | @@ -277,21 +237,12 @@ function dealItems() { | ||
277 | return; | 237 | return; |
278 | } | 238 | } |
279 | 239 | ||
280 | -<<<<<<< HEAD | ||
281 | - var totalLineNum = 7; // 7 行 | ||
282 | - var maxTitleStrNum = 45; // 15个字 | ||
283 | - var maxDetailStrNum = 66; // 22个字 | ||
284 | 240 | ||
285 | - if (document.body.clientWidth < 1190) { | ||
286 | - totalLineNum = 6; // 6 行 | ||
287 | - maxTitleStrNum = 39; // 13个字 | ||
288 | - maxDetailStrNum = 54; // 18个字 | ||
289 | -======= | ||
290 | var totalLineNum = 7; | 241 | var totalLineNum = 7; |
291 | // 7 行 | 242 | // 7 行 |
292 | var maxTitleStrNum = 45; | 243 | var maxTitleStrNum = 45; |
293 | // 15个字 | 244 | // 15个字 |
294 | - var maxDetailStrNum = 66; | 245 | + var maxDetailStrNum = 22; |
295 | // 22个字 | 246 | // 22个字 |
296 | 247 | ||
297 | if (document.body.clientWidth < 1190) { | 248 | if (document.body.clientWidth < 1190) { |
@@ -301,7 +252,6 @@ function dealItems() { | @@ -301,7 +252,6 @@ function dealItems() { | ||
301 | // 13个字 | 252 | // 13个字 |
302 | maxDetailStrNum = 54; | 253 | maxDetailStrNum = 54; |
303 | // 18个字 | 254 | // 18个字 |
304 | ->>>>>>> ww_develop | ||
305 | } | 255 | } |
306 | 256 | ||
307 | var titleLineNum = 0; | 257 | var titleLineNum = 0; |
@@ -335,20 +285,6 @@ function dealItems() { | @@ -335,20 +285,6 @@ function dealItems() { | ||
335 | }); | 285 | }); |
336 | citems = null; | 286 | citems = null; |
337 | } | 287 | } |
338 | -<<<<<<< HEAD | ||
339 | - | ||
340 | -// function fillDetail() | ||
341 | -// { | ||
342 | -// var citems=$(".content-item"); | ||
343 | -// if(citems.length>0) | ||
344 | -// { | ||
345 | -// citems.each(function(index,obj){ | ||
346 | -// var self=$(obj); | ||
347 | -// self.find(".a-detail").fillText("detail"); | ||
348 | -// | ||
349 | -// }); | ||
350 | -// } | ||
351 | -// } | ||
352 | 288 | ||
353 | $(function() { | 289 | $(function() { |
354 | dealItems(); | 290 | dealItems(); |
@@ -367,7 +303,6 @@ window.currentWidth = document.body.clientWidth; | @@ -367,7 +303,6 @@ window.currentWidth = document.body.clientWidth; | ||
367 | 303 | ||
368 | var isIpad = getBrowType().bIsIpad; | 304 | var isIpad = getBrowType().bIsIpad; |
369 | 305 | ||
370 | -======= | ||
371 | 306 | ||
372 | $(function() { | 307 | $(function() { |
373 | dealItems(); | 308 | dealItems(); |
@@ -384,7 +319,6 @@ fillDetail(); | @@ -384,7 +319,6 @@ fillDetail(); | ||
384 | 319 | ||
385 | var isIpad = getBrowType().bIsIpad; | 320 | var isIpad = getBrowType().bIsIpad; |
386 | 321 | ||
387 | ->>>>>>> ww_develop | ||
388 | if (isIpad === true) { | 322 | if (isIpad === true) { |
389 | $(".search-loading-icon").hide(); | 323 | $(".search-loading-icon").hide(); |
390 | $(".search-area").width($(".search-area").width() - 43); | 324 | $(".search-area").width($(".search-area").width() - 43); |
@@ -394,29 +328,17 @@ if (isIpad === true) { | @@ -394,29 +328,17 @@ if (isIpad === true) { | ||
394 | $(".search-text").show(); | 328 | $(".search-text").show(); |
395 | } | 329 | } |
396 | 330 | ||
397 | -<<<<<<< HEAD | ||
398 | 331 | ||
399 | -======= | ||
400 | ->>>>>>> ww_develop | ||
401 | function getBrowType() { | 332 | function getBrowType() { |
402 | var info = {}; | 333 | var info = {}; |
403 | var sUserAgent = navigator.userAgent.toLowerCase(); | 334 | var sUserAgent = navigator.userAgent.toLowerCase(); |
404 | info.bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; | 335 | info.bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; |
405 | -<<<<<<< HEAD | ||
406 | - // info.bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; | ||
407 | - // info.bIsMidp = sUserAgent.match(/midp/i) == "midp"; | ||
408 | - // info.bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; | ||
409 | - // info.bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; | ||
410 | - // info.bIsAndroid = sUserAgent.match(/android/i) == "android"; | ||
411 | - // info.bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; | ||
412 | -======= | ||
413 | // info.bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; | 336 | // info.bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; |
414 | // info.bIsMidp = sUserAgent.match(/midp/i) == "midp"; | 337 | // info.bIsMidp = sUserAgent.match(/midp/i) == "midp"; |
415 | // info.bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; | 338 | // info.bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; |
416 | // info.bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; | 339 | // info.bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; |
417 | // info.bIsAndroid = sUserAgent.match(/android/i) == "android"; | 340 | // info.bIsAndroid = sUserAgent.match(/android/i) == "android"; |
418 | // info.bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; | 341 | // info.bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; |
419 | ->>>>>>> ww_develop | ||
420 | // info.bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; | 342 | // info.bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; |
421 | return info; | 343 | return info; |
422 | } | 344 | } |
@@ -429,7 +351,6 @@ if (!isIpad && $(".share").size() > 0) { | @@ -429,7 +351,6 @@ if (!isIpad && $(".share").size() > 0) { | ||
429 | scrollTop = $(window).scrollTop(); | 351 | scrollTop = $(window).scrollTop(); |
430 | if (shareOffsetTop - scrollTop - navHeight <= 0) { | 352 | if (shareOffsetTop - scrollTop - navHeight <= 0) { |
431 | $(".share").css({ | 353 | $(".share").css({ |
432 | -<<<<<<< HEAD | ||
433 | "position": "fixed", | 354 | "position": "fixed", |
434 | "top": navHeight | 355 | "top": navHeight |
435 | }); | 356 | }); |
@@ -437,21 +358,11 @@ if (!isIpad && $(".share").size() > 0) { | @@ -437,21 +358,11 @@ if (!isIpad && $(".share").size() > 0) { | ||
437 | $(".share").css({ | 358 | $(".share").css({ |
438 | "position": "absolute", | 359 | "position": "absolute", |
439 | "top": shareOffsetTop | 360 | "top": shareOffsetTop |
440 | -======= | ||
441 | - "position" : "fixed", | ||
442 | - "top" : navHeight | ||
443 | - }); | ||
444 | - } else { | ||
445 | - $(".share").css({ | ||
446 | - "position" : "absolute", | ||
447 | - "top" : shareOffsetTop | ||
448 | ->>>>>>> ww_develop | ||
449 | }); | 361 | }); |
450 | } | 362 | } |
451 | }); | 363 | }); |
452 | } | 364 | } |
453 | 365 | ||
454 | -<<<<<<< HEAD | ||
455 | window.scrollWindow = function() { | 366 | window.scrollWindow = function() { |
456 | if (document.body.clientWidth >= 1190) { | 367 | if (document.body.clientWidth >= 1190) { |
457 | //document.body.scrollTop=850; | 368 | //document.body.scrollTop=850; |
@@ -464,7 +375,6 @@ window.scrollWindow = function() { | @@ -464,7 +375,6 @@ window.scrollWindow = function() { | ||
464 | window.tmp$(window).scrollTop(600); | 375 | window.tmp$(window).scrollTop(600); |
465 | } | 376 | } |
466 | }; | 377 | }; |
467 | -======= | ||
468 | //搜索按钮=========================================================================== | 378 | //搜索按钮=========================================================================== |
469 | $(".search-input-box").keypress(function(event) { | 379 | $(".search-input-box").keypress(function(event) { |
470 | var keyCode = event.keyCode; | 380 | var keyCode = event.keyCode; |
@@ -473,29 +383,31 @@ $(".search-input-box").keypress(function(event) { | @@ -473,29 +383,31 @@ $(".search-input-box").keypress(function(event) { | ||
473 | } | 383 | } |
474 | }); | 384 | }); |
475 | 385 | ||
476 | -$("#search-button").click(function(){ | ||
477 | - if($.trim($(".search-input-box").val())!==""){ | ||
478 | - document.location=$(this).attr("searchURL")+"?q="+$(".search-input-box").val(); | 386 | +$("#search-button").click(function() { |
387 | + if ($.trim($(".search-input-box").val()) !== "") { | ||
388 | + document.location = $(this).attr("searchURL") + "?q=" + $(".search-input-box").val(); | ||
479 | } | 389 | } |
480 | return false; | 390 | return false; |
481 | }); | 391 | }); |
482 | 392 | ||
483 | -$(document.body).click(function(){ | 393 | +$(document.body).click(function() { |
484 | var target = $(".search-text"); | 394 | var target = $(".search-text"); |
485 | target.find(".search-input-box").hide(); | 395 | target.find(".search-input-box").hide(); |
486 | target.find(".home-search-button").hide(); | 396 | target.find(".home-search-button").hide(); |
487 | target.find(".search-text-content").show(); | 397 | target.find(".search-text-content").show(); |
488 | target.animate({ | 398 | target.animate({ |
489 | - width : 120 | 399 | + width: 120 |
490 | }, 500); | 400 | }, 500); |
491 | }); | 401 | }); |
492 | -$(".search-text").click(function(){return false;}); | 402 | +$(".search-text").click(function() { |
403 | + return false; | ||
404 | +}); | ||
493 | $(".search-text").click(function() { | 405 | $(".search-text").click(function() { |
494 | $(this).find(".search-text-content").hide(); | 406 | $(this).find(".search-text-content").hide(); |
495 | $(this).find(".search-input-box").width(150).val("").show(); | 407 | $(this).find(".search-input-box").width(150).val("").show(); |
496 | 408 | ||
497 | $(this).animate({ | 409 | $(this).animate({ |
498 | - width : 190 | 410 | + width: 190 |
499 | }, 500, function() { | 411 | }, 500, function() { |
500 | $(this).find(".home-search-button").show(); | 412 | $(this).find(".home-search-button").show(); |
501 | $(this).find(".search-input-box").focus(); | 413 | $(this).find(".search-input-box").focus(); |
@@ -516,4 +428,3 @@ window.scrollWindow = function() { | @@ -516,4 +428,3 @@ window.scrollWindow = function() { | ||
516 | window.tmp$(window).scrollTop(600); | 428 | window.tmp$(window).scrollTop(600); |
517 | } | 429 | } |
518 | }; | 430 | }; |
519 | ->>>>>>> ww_develop |
@@ -306,9 +306,6 @@ seajs.config({ | @@ -306,9 +306,6 @@ seajs.config({ | ||
306 | 'jquery-2.1.3': 'lib/jquery-2.1.3' | 306 | 'jquery-2.1.3': 'lib/jquery-2.1.3' |
307 | <<<<<<< HEAD | 307 | <<<<<<< HEAD |
308 | },*/ | 308 | },*/ |
309 | -======= | ||
310 | - }, | ||
311 | ->>>>>>> ww_develop | ||
312 | base: 'http://localhost:8000/', | 309 | base: 'http://localhost:8000/', |
313 | charset: 'utf-8' | 310 | charset: 'utf-8' |
314 | }); | 311 | }); |
@@ -18,18 +18,15 @@ | @@ -18,18 +18,15 @@ | ||
18 | "dependencies": { | 18 | "dependencies": { |
19 | "jquery": "~1.8.3", | 19 | "jquery": "~1.8.3", |
20 | "lazyload": "~1.9.6", | 20 | "lazyload": "~1.9.6", |
21 | - "yoho.swiper": "~2.7.0", | ||
22 | - "yoho-idangerous.swiper": "~0.0.2", | ||
23 | - "box": "~0.0.0", | ||
24 | - "yoho-box": "~0.0.1", | 21 | + "yoho.swiper": "2.7.0", |
22 | + "yoho-idangerous.swiper": "0.0.2", | ||
23 | + "box": "0.0.0", | ||
24 | + "yoho-box": "0.0.1", | ||
25 | "yoho-tools": "~0.0.4", | 25 | "yoho-tools": "~0.0.4", |
26 | - "yoho-tips": "~0.0.1", | ||
27 | - "jquery-ui": "~1.11.1", | 26 | + "yoho-tips": "0.0.1", |
28 | "mustache": "2.0.0", | 27 | "mustache": "2.0.0", |
29 | - "yoho-idangerous.swiper": "0.0.2", | ||
30 | - "jquery.autocomplete": "0.0.2", | ||
31 | - "mlellipsis": "0.0.2", | ||
32 | - "jquery.autocomplete": "~0.0.2" | 28 | + "jquery.autocomplete": "~0.0.2", |
29 | + "mlellipsis": "0.0.2" | ||
33 | }, | 30 | }, |
34 | "devDependencies": { | 31 | "devDependencies": { |
35 | "expect.js": "0.3.1" | 32 | "expect.js": "0.3.1" |
-
Please register or login to post a comment