Authored by 2586703@qq.com

冲突修改

/**
* @fileOverview map页面JS
* @author wei.wang@yoho.cn
* @date 2014-05-21
*/
var $ = jQuery = require("jquery");
require("../public");
require("../plugin/nicescroll");
var _ui=require("jquery-ui");
_ui($);
require("jquery.imagesloaded");
initShopListHeight();
$(".city-list").niceScroll();
var currentZoom=0.85;
var OriginalWidth=0,OriginalHeight=0,OriginalMarks={};
exports.init=function(){
$(".map-zoom").show();
OriginalWidth=$("#citymap-img").width();
OriginalHeight=$("#citymap-img").height();
$("#map-zoom-max").click(function(){zoomMax();});
$("#map-zoom-min").click(function(){zoomMin();});
$(".big-mark").each(function(index,obj){
var top=$(this).top();
var left=$(this).left();
OriginalMarks[$(this).attr("id")]={left:left,top:top};
});
$(window).bind("resize",function(){
initShopListHeight();
});
$(".shop").unbind("hover").hover(
function(){
$("#citymap").stop();
$(".mark-tips").hide();//隐藏现有的气泡
moveShopToView(this);
},
function(){
var shopId=$(this).id().replace("shoplist-","mark");
$("#"+shopId).find(".mark-tips").hide();
}
);
$(".big-mark").hover(
function(){$(this).find(".mark-tips").css("display","table");},
function(){$(this).find(".mark-tips").css("display","none");}
);
$(".shop-name").click(function(){
var url=$(this).attr("src");
window.open(url);
});
$(".big-mark").click(function(){
var href=$("a[val='"+$(this).attr("val")+"']").attr("src");
window.open(href);
});
var bodyHeight = document.body.clientHeight - 177;
$(".map-city-content").height(bodyHeight);
$(window).bind("resize", function()
{
var bodyHeight = document.body.clientHeight - 177;
$(".map-city-content").height(bodyHeight);
$("#citymap-img").width($("#citymap").width());
$("#citymap-img").height($("#citymap").height());
});
$("#citymap-img").imagesLoaded(function()
{
$(this).width("100%").height("100%");
$("#citymap").css({width: $(this).width(), height: $(this).height(), position: "relative"}).draggable({
drag: function() {},
stop: function() {
mapRevert(this);
}
});
});
var isMouseDown = false;
};
function initShopListHeight(){
var currentWidth=document.body.clientWidth;
if(currentWidth>=1190)
{
$(".city-list").height(document.body.clientHeight-310);
}
else if(currentWidth<1190&&currentWidth>769)
{
$(".city-list").height(document.body.clientHeight-260);
}
else if(currentWidth<=768)
{
$(".city-list").height(document.body.clientHeight-178);
}
}
/*在商店上显示tips*/
function shopShowTips(obj){
var shopId=$(obj).id().replace("shoplist-","mark");
$("#"+shopId).find(".mark-tips").show();
}
/*如果店铺不在当前视野范围内,则移动到当前范围*/
function moveShopToView(obj){
var contentHeight=$(".map-city-content").height();
var contentWidth=document.body.clientWidth;
var shopId=$(obj).id().replace("shoplist-","mark");
var top=$("#"+shopId).offset().top;
var left=$("#"+shopId).offset().left;
var absoluteTop=0;
var absoluteLeft=0;//$("#"+shopId).offset().left+$("#citymap").left();
if ($("#"+shopId).css("top").indexOf("%")>0) {
absoluteTop=parseFloat($("#"+shopId).css("top").replace("%",""))/100*$("#citymap").height();
absoluteLeft=parseFloat($("#"+shopId).css("left").replace("%",""))/100*$("#citymap").width();
}
else
{
absoluteTop=$("#"+shopId).top();
absoluteLeft=$("#"+shopId).left();
}
var location=getScreenCenter();
if(top<304&&top>0||top<0||
top+177>document.body.clientHeight
||left<$(".city-list").width()
||left>document.body.clientWidth
)
{
var toTop=location.y-absoluteTop;
var toLeft=location.x-absoluteLeft;
if (toLeft>$(".city-list").width()) {
toLeft=$(".city-list").width();
}
if (toTop>190) {
toTop=190;
}
$("#citymap").animate({top:toTop,left:toLeft},500,function(){
$("#"+shopId).find(".mark-tips").show();
});
}
else
{
$("#"+shopId).find(".mark-tips").show();
}
}
function zoom(){
var width=OriginalWidth*currentZoom;
var height=OriginalHeight*currentZoom;
$("#citymap").width(width);
$("#citymap").height(height);
}
function zoomMax(){
if(currentZoom>=1)
{
return;
}
currentZoom=currentZoom+0.05;
zoom();
}
function zoomMin(){
if(currentZoom<=0.7)
{
return;
}
currentZoom=currentZoom-0.05;
zoom();
}
function mapRevert(obj)
{
var top = parseFloat($(obj).css("top").replace("px", ""));
var left = parseFloat($(obj).css("left").replace("px", ""));
var contentHeight = $(".map-city-content").height();
var contentWidth = document.body.clientWidth;
var bottom = contentHeight - top - $(obj).height();
// var right = contentWidth - left - parseFloat($(obj).width());
// var rightForbid = contentWidth - $(".city-shop-list").width();
if (top > 120 && bottom < 0)
{
$(obj).animate({top: 120}, 500);
}
if (bottom > 0 && top < 120)
{
$(obj).animate({top: contentHeight - $(obj).height()}, 500);
}
if (left + $(obj).width() <= $(".city-shop-list").width())
{
$(obj).animate({left: contentWidth - $(obj).width()}, 500);
}
if (left > contentWidth)
{
$(obj).animate({left: contentWidth - $(obj).width()}, 500);
}
}
function getScreenCenter(){
var width=document.body.clientWidth;
var height=document.body.clientHeight;
var _left=(width-$(".city-shop-list").width())/2+$(".city-shop-list").width();
var _headerHeight=$("#maxEnterprise").height()-$(".enterprise-header").height()-12;
var _top=$(".map-city-content").height()/2;
//$("<span/>").css({position:"absolute",display:"block",width:20,height:20,"z-index":20,background:"#f00",left:_left,top:_top}).appendTo(document.body);
return {x:_left,y:_top};
}
/**
* @fileOverview 首页JS
* @author wei.wang@yoho.cn
* @date 2014-05-21
*/
var $=require("jquery");
//require("lib/ui/touch");
//require("lib/util/jquery.hammer");
require("../public");
require("jquery.imagesloaded");
var currentZoom=0.85;
var OriginalWidth=0,OriginalHeight=0,OriginalMarks={};
window.onresize=function(){
initShopListHeight();
var bodyWidth=document.body.clientWidth;
$("#citymap").width(bodyWidth-$(".city-shop-list").width());
var contentWidth = $(".map-city-content").width();
var currentLeft=parseFloat(contentWidth-$("#citymap").width());
$("#citymap").css({"left":currentLeft,top:0});
}
exports.init=function(){
initShopListHeight();
$(".city-list").find("div").niceScroll();
$(document.body).css({overflow:"hidden"});
var bodyWidth=document.body.clientWidth;
$("#citymap-img").imagesLoaded(function()
{
$(this).width("100%").height("100%");
});
$(".shop").hover(
function(){
$(".mark-tips").hide();
var shopId=$(this).id().replace("shoplist-","mark");
var shopObj=$("#"+shopId);
var top=0;
var left=0;
var _top=parseFloat($("#"+shopId)[0].style.top.replace("%",""));
var _left=parseFloat($("#"+shopId)[0].style.left.replace("%",""));
top=_top/100*$("#citymap").height();
left=_left/100*$("#citymap").width();
console.log(top,left);
console.log(bodyWidth-shopObj.offset().left);
if(top<120&&left<250){
//显示在右下角
$("#"+shopId).find(".mark-tips").attr("class","mark-tips left-bottom");
}
else if(top>120&&left<250)
{
//显示在右上角
$("#"+shopId).find(".mark-tips").attr("class","mark-tips left");
}
else if(top<120&&left>250&&bodyWidth-shopObj.offset().left>250)
{
//显示在左下角
$("#"+shopId).find(".mark-tips").attr("class","mark-tips left-bottom");
}
else if (top<120&&left>250&&bodyWidth-shopObj.offset().left<250) {
$("#"+shopId).find(".mark-tips").attr("class","mark-tips right-bottom");
}
else if(top>120&&left>250&&bodyWidth-shopObj.offset().left>250)
{
//显示在左角
$("#"+shopId).find(".mark-tips").attr("class","mark-tips left");
}
else if(top>120&&left>250&&bodyWidth-shopObj.offset().left<250)
{
//显示在左角
$("#"+shopId).find(".mark-tips").attr("class","mark-tips right");
}
$("#"+shopId).find(".mark-tips").show().unbind().click(function(){
var href=$("a[val='"+$(this).parent().attr("val")+"']").attr("src");
window.open(href);
});
},
function(){
var shopId=$(this).id().replace("shoplist-","mark");
}
);
$("#citymap-img").width("100%").height("100%");
var bodyHeight = document.body.clientHeight - 177;
$(".map-city-content").height(bodyHeight);
$("#citymap").width(bodyWidth-$(".city-shop-list").width());
var contentWidth = $(".map-city-content").width();
var currentLeft=parseFloat(contentWidth-$("#citymap").width());
$("#citymap").css({"left":currentLeft,top:0});
var currentTop=parseFloat($("#citymap").css("top").replace("px",""));
};
function initShopListHeight(){
var currentWidth=document.body.clientWidth;
if(currentWidth>=1190)
{
$(".city-list").height(document.body.clientHeight-310);
}
else if(currentWidth<1190&&currentWidth>=769)
{
$(".city-list").height(document.body.clientHeight-260);
}
else if(currentWidth<=768)
{
$(".city-list").height(document.body.clientHeight-268);
}
}
/**
* @fileOverview 地图列表
* @author feiker <fei.hong@yoho.cn>
* @date 2013-06-04
*/
var $ = require('jquery');
require('yoho.easing');
require('jquery.imagesloaded');
require('jquery.pin');
require('jquery-ui');
require('jquery.ui.touch-punch');
require('jquery.wresize');
$("#map-pannel").css({"background":"#fff",height:"300px"}).pin({containerSelector: ".wrapper"});
$(".hot-area").mouseover(function(){
$(this).find(".background").show();
$(this).find(".china-area").show();
});
$(window).scroll(function()
{
var height = $(".page-head").height();
$("#map-pannel").css({"top":height+"px"});
});
var mapW = $(".grid-city-map").width();
$(".background").on("click",function(){
$(this).hide();
$(".china-area").hide();
});
if($(".grid-city-map #map").length)
{
//页面图加载完成
$(".grid-city-map #map").imagesLoaded(function()
{
$(".handle").show().mousedown(function()
{
$(this).addClass('grabbing');
}).mouseup(function()
{
$(this).removeClass('grabbing');;
});
//hover到店铺列表后的地图移动和tip展示
var timeoutHandle= null;
$(".map-shop-list .shop-name").hover(function()
{
var self = $(this);
window.clearTimeout(timeoutHandle);
timeoutHandle = window.setTimeout(function()
{
showTip(self.attr("val"),this);
$("#"+self.attr("val")).css({"z-index":1000});
},650);
},function()
{
$(".mark-tip").fadeOut('fast');
$("#"+$(this).attr("val")).css({"z-index":3});
});
//鼠标移到建筑物展示tip
var setime = null;
var tip_clone = null;
$(".grid-city-map .mark").hover(function()
{
// window.clearTimeout(setime);
var id = $(this).attr("val");
$(this).find(".mark-tip").show();
var pos = $("#"+id).position();
var tipPos = pos.left>$(".grid-city-map").width()/2?"left":"right";
$("#"+id).find(".mark-tip").attr("class","mark-tip "+tipPos);
$("#"+id).css({"z-index":1000});
var distance = $("#"+id).find(".mark-tip").offset();
tip_clone = $("#"+id).find(".mark-tip").hide().clone();
//$(this).parent().append(tip_clone);
$("body").append(tip_clone);
var top=parseInt($("#"+id).css("top").replace("px",""))-parseInt(tip_clone.css("height").replace("px",""));
var left=parseInt($("#"+id).css("left").replace("px",""))-parseInt(tip_clone.css("width").replace("px",""));
tip_clone.attr("id", id+"_clone").css({"position": "fixed",
"top": distance.top+"px",
"left": distance.left+"px",
"z-index": 1000000}).show();
// 鼠标移动到克隆的mark-tip触发的事件
$("#"+id+"_clone").hover(function(){
window.clearTimeout(setime); //鼠标划过的时候清除延迟(即清除setime这个函数);
}, function(){
$(this).fadeOut("fast");
$(this).remove();
});
},function()
{
var self = $(this);
setime = setTimeout(function(){
var clone = $("#"+self.attr("val")+"_clone");
clone.fadeOut("fast");
clone.remove();
}, 50);
$("#"+$(this).attr("val")).css({"z-index":3});
});
//打开该店铺
$(".grid-city-map .mark img").click(function()
{
var id = $(this).parent('.mark').attr("id");
var href = $(".map-shop-list a[val='"+id+"']").attr("href");
//window.location.href = href;
window.open(href);
});
initMap();
$(".handle").draggable({ axis: "y",containment:"parent"});
});
function initMap()
{
//设置地图面板的高宽
var mapH = $("#map")[0].clientHeight;
var mapW = $("#map")[0].clientWidth;
$(".grid-city-map").height(mapH);
$("#map-pannel").width(mapW);
//初始化坐标位置
$(".grid-city-map .mark").each(function()
{
var w = $(this).attr('left')/10000;
var h = $(this).attr('top')/10000;
$(this).css({left:(mapW*w)+"px",top:(mapH*h)+"px"});
});
//设置拖拽
var ch = $(".map-hide").height();
$("#drag-pannel").width(mapW).height(mapH*2-ch+161).css({"position":"absolute","top":(ch-mapH)+"px"});
$(".handle").css({"top":(mapH-ch)+"px"});
}
$(window).resize(initMap);
//展示tip和移动
function showTip(id,obj)
{
$(".mark-tip").hide();
var pos = $("#"+id).position();
var height = $("#"+id).height();
var tipHeight = 161;
var cur = (420-(height+161))/2+tipHeight;
var num = cur-pos.top;
var tipPos = pos.left>$(".grid-city-map").width()/2?"left":"right";
$("#"+id).find(".mark-tip").attr("class","mark-tip "+tipPos);
var ch = $(".map-hide").height();
var mapH = $("#map").height();
num=num+(mapH-ch);
if(num==0)
{
return;
}
//设置移动和动画
$(".grid-city-map").stop( true, true ).animate({"top":num+"px"},200,"easeOutExpo",function()
{
$("#"+id).stop( true, true ).animate({"top":"-=40px"},100,"easeOutQuart")
.animate({"top":"+=40px"},300,"easeOutBounce",function()
{
$(".mark-tip").hide();
$(this).find(".mark-tip").show();
});
});
}
$(".parent-nav li").css({"cursor":"pointer"});
$(".parent-nav li").click(function()
{
window.location.href = $(this).find("a").attr("href");
});
}
//导航切换分页
var offset = 0;
var limit = 9;
function navMove(num)
{
if((offset==0&&num<0)||(num>0&&offset+limit>=$(".sub-nav:eq(1) li").length))
{
return;
}
offset+=num;
$(".sub-nav:eq(1) li").hide();
$(".sub-nav:eq(1) li").each(function()
{
var index = $(".sub-nav:eq(1) li").index(this);
if(index>=offset&&index<(offset+limit))
{
$(this).show();
}
});
if((num>0&&offset+limit>=$(".sub-nav:eq(1) li").length))
{
$(".sub-nav:eq(2) span").removeClass("click");
}
else
{
$(".sub-nav:eq(2) span").addClass("click");
}
if((offset==0&&num<0))
{
$(".sub-nav:eq(0) span").removeClass("click");
}
else
{
$(".sub-nav:eq(0) span").addClass("click");
}
}
$(".sub-nav:eq(0) span").click(function()
{
navMove(-limit);
});
$(".sub-nav:eq(2) span").click(function()
{
navMove(limit);
});
//首页的行为
$(".big-mark").hover(function()
{
$(this).css({'z-index':1000});
if(Number(this.style.left.replace("%",""))<50)
{
$(this).find(".mark-tip").attr("class","mark-tip rights");
}
$(this).find(".mark-tip").fadeIn('fast');
},function()
{
$(this).find(".mark-tip").fadeOut('fast');
$(this).css({'z-index':2});
});
$(".big-mark").click(function()
{
window.location.href = $(this).attr("url");
});
function setDrag()
{
//$(".wrapper").css({"width":"100%"});
var w = $(".gird-map-pan").width();
var maxW = $("#drag_handle").width();
var left = $(".gird-map-pan").offset().left;
//$("#drag_handle").draggable({ axis: "x",containment:[(w-maxW+left),0,left,0]});
//$("#drag_handle").css({"left":((w-maxW)/2)+"px"});
if(w<1320)
{
$("#drag_handle").width(980).height(486);
$("#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");
}
else
{
$("#drag_handle").width(1320).height(654);
$("#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");
}
$(".footer").css({"margin-top":"20px"});
}
if($("#drag_handle").length>0)
{
$(window).resize(setDrag);
setDrag();
}
var flag = null;
$("#Map-area area").hover(function()
{
$("#china-map").show();
$("#drag_handle").css({'opacity':'0.4'});
},function()
{
flag = window.setTimeout(function()
{
$("#china-map").hide();
$("#drag_handle").css({'opacity':'1'});
},0);
});
$("#china-map").hover(function()
{
window.clearTimeout(flag);
$("#china-map").show();
$("#drag_handle").css({'opacity':'0.4'});
},function()
{
$("#china-map").hide();
$("#drag_handle").css({'opacity':'1'});
});
... ... @@ -5,10 +5,6 @@
*/
window.tmp$ = null;
var $ = require('jquery');
window.tmp$ = $;
<<<<<<< HEAD
var Swiper = require("yoho.swiper");
require('./plugin/lazyloadImage');
$(".lazy").lazyload();
$.fn.top = function() {
if (arguments.length > 0) {
... ... @@ -27,13 +23,12 @@ $.fn.left = function() {
return parseFloat($(this).css("left").replace("px", ""));
}
};
=======
require("lazyload");
var Swiper = require("yoho-idangerous.swiper");
$(".lazy").lazyload();
//扩展jquery=================================================================
>>>>>>> ww_develop
$.fn.id = function() {
if (arguments.length > 0) {
$(this).attr("id", arguments[0]);
... ... @@ -46,21 +41,12 @@ $.fn.id = function() {
//banner========================================================================================================
if ($(".swiper-container").find(".swiper-slide").length > 1) {
var mySwiper = new Swiper('.swiper-container', {
<<<<<<< HEAD
pagination: '.pagination-banner',
loop: true,
autoplay: 5000,
grabCursor: true,
paginationClickable: true,
autoStopPlay: false
=======
pagination : '.pagination-banner',
loop : true,
autoplay : 5000,
grabCursor : true,
paginationClickable : true,
autoStopPlay : false
>>>>>>> ww_develop
});
$('.arrow-left').on('click', function(e) {
e.preventDefault();
... ... @@ -74,23 +60,20 @@ if ($(".swiper-container").find(".swiper-slide").length > 1) {
//==============================================================================================================
<<<<<<< HEAD
=======
//centerbanner=============================================================================
var bannerSwiper = new Swiper('.swiper-container2', {
pagination : '.pagination-adv',
loop : true,
autoplay : 2000,
autoStopPlay : false,
paginationClickable : true,
onSlideChangeEnd : function() {
pagination: '.pagination-adv',
loop: true,
autoplay: 2000,
autoStopPlay: false,
paginationClickable: true,
onSlideChangeEnd: function() {
bannerSwiper.startAutoplay();
$(".swiper-container2 .lazy").lazyload();
}
});
//================================================================================================
>>>>>>> ww_develop
$(".getapp").hover(function() {
$(this).find(".bitmap").show();
$("img").lazyload();
... ... @@ -113,22 +96,12 @@ $(".li-weixin").mouseover(function() {
$(".li-weixin").click(function() {
return false;
});
<<<<<<< HEAD
$("#maxEnterprise").click(function() {
$(".bitmap").hide();
$(".pop").hide();
});
$("#minEnterprise").click(function() {
$(".bitmap").hide();
$(".pop").hide();
});
=======
>>>>>>> ww_develop
$(".content").click(function() {
$(".bitmap").hide();
$(".pop").hide();
});
<<<<<<< HEAD
//企业滚动效果======================================================================================================
var minMenuHasShow = false; //小导航是否显示
var isTop = true; //滚动条是否在顶部
... ... @@ -211,33 +184,22 @@ if (document.body.scrollTop > 0 && isTop === true) {
}, 200);
isTop = true;
}
=======
>>>>>>> ww_develop
//回到顶部按钮======================================================================================================
$(".return-to-top").click(function() {
$("html,body").animate({
<<<<<<< HEAD
scrollTop: 0
}, 300, function() {
$(".return-to-top").animate({
"filter": "alpha(opacity=0)",
"-moz-opacity": "0",
opacity: "0"
=======
scrollTop : 0
}, 300, function() {
$(".return-to-top").animate({
"filter" : "alpha(opacity=0)",
"-moz-opacity" : "0",
opacity : "0"
>>>>>>> ww_develop
}, 200);
});
});
//===============================================================================================================
<<<<<<< HEAD
//子菜单交互========================================================================================================
... ... @@ -255,8 +217,6 @@ function createSubMenu(info) {
}
//================================================================================================================
=======
//子菜单交互========================================================================================================
function createSubMenu(info) {
var data = {};
... ... @@ -267,7 +227,7 @@ function createSubMenu(info) {
}
//================================================================================================================
>>>>>>> ww_develop
//频道页、首页碎片交互=================================================================================================
//mulLine.init();
... ... @@ -277,21 +237,12 @@ function dealItems() {
return;
}
<<<<<<< HEAD
var totalLineNum = 7; // 7 行
var maxTitleStrNum = 45; // 15个字
var maxDetailStrNum = 66; // 22个字
if (document.body.clientWidth < 1190) {
totalLineNum = 6; // 6 行
maxTitleStrNum = 39; // 13个字
maxDetailStrNum = 54; // 18个字
=======
var totalLineNum = 7;
// 7 行
var maxTitleStrNum = 45;
// 15个字
var maxDetailStrNum = 66;
var maxDetailStrNum = 22;
// 22个字
if (document.body.clientWidth < 1190) {
... ... @@ -301,7 +252,6 @@ function dealItems() {
// 13个字
maxDetailStrNum = 54;
// 18个字
>>>>>>> ww_develop
}
var titleLineNum = 0;
... ... @@ -335,20 +285,6 @@ function dealItems() {
});
citems = null;
}
<<<<<<< HEAD
// function fillDetail()
// {
// var citems=$(".content-item");
// if(citems.length>0)
// {
// citems.each(function(index,obj){
// var self=$(obj);
// self.find(".a-detail").fillText("detail");
//
// });
// }
// }
$(function() {
dealItems();
... ... @@ -367,7 +303,6 @@ window.currentWidth = document.body.clientWidth;
var isIpad = getBrowType().bIsIpad;
=======
$(function() {
dealItems();
... ... @@ -384,7 +319,6 @@ fillDetail();
var isIpad = getBrowType().bIsIpad;
>>>>>>> ww_develop
if (isIpad === true) {
$(".search-loading-icon").hide();
$(".search-area").width($(".search-area").width() - 43);
... ... @@ -394,29 +328,17 @@ if (isIpad === true) {
$(".search-text").show();
}
<<<<<<< HEAD
=======
>>>>>>> ww_develop
function getBrowType() {
var info = {};
var sUserAgent = navigator.userAgent.toLowerCase();
info.bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
<<<<<<< HEAD
// info.bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
// info.bIsMidp = sUserAgent.match(/midp/i) == "midp";
// info.bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
// info.bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
// info.bIsAndroid = sUserAgent.match(/android/i) == "android";
// info.bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
=======
// info.bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
// info.bIsMidp = sUserAgent.match(/midp/i) == "midp";
// info.bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
// info.bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
// info.bIsAndroid = sUserAgent.match(/android/i) == "android";
// info.bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
>>>>>>> ww_develop
// info.bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
return info;
}
... ... @@ -429,7 +351,6 @@ if (!isIpad && $(".share").size() > 0) {
scrollTop = $(window).scrollTop();
if (shareOffsetTop - scrollTop - navHeight <= 0) {
$(".share").css({
<<<<<<< HEAD
"position": "fixed",
"top": navHeight
});
... ... @@ -437,21 +358,11 @@ if (!isIpad && $(".share").size() > 0) {
$(".share").css({
"position": "absolute",
"top": shareOffsetTop
=======
"position" : "fixed",
"top" : navHeight
});
} else {
$(".share").css({
"position" : "absolute",
"top" : shareOffsetTop
>>>>>>> ww_develop
});
}
});
}
<<<<<<< HEAD
window.scrollWindow = function() {
if (document.body.clientWidth >= 1190) {
//document.body.scrollTop=850;
... ... @@ -464,7 +375,6 @@ window.scrollWindow = function() {
window.tmp$(window).scrollTop(600);
}
};
=======
//搜索按钮===========================================================================
$(".search-input-box").keypress(function(event) {
var keyCode = event.keyCode;
... ... @@ -473,29 +383,31 @@ $(".search-input-box").keypress(function(event) {
}
});
$("#search-button").click(function(){
if($.trim($(".search-input-box").val())!==""){
document.location=$(this).attr("searchURL")+"?q="+$(".search-input-box").val();
$("#search-button").click(function() {
if ($.trim($(".search-input-box").val()) !== "") {
document.location = $(this).attr("searchURL") + "?q=" + $(".search-input-box").val();
}
return false;
});
$(document.body).click(function(){
$(document.body).click(function() {
var target = $(".search-text");
target.find(".search-input-box").hide();
target.find(".home-search-button").hide();
target.find(".search-text-content").show();
target.animate({
width : 120
width: 120
}, 500);
});
$(".search-text").click(function(){return false;});
$(".search-text").click(function() {
return false;
});
$(".search-text").click(function() {
$(this).find(".search-text-content").hide();
$(this).find(".search-input-box").width(150).val("").show();
$(this).animate({
width : 190
width: 190
}, 500, function() {
$(this).find(".home-search-button").show();
$(this).find(".search-input-box").focus();
... ... @@ -516,4 +428,3 @@ window.scrollWindow = function() {
window.tmp$(window).scrollTop(600);
}
};
\ No newline at end of file
>>>>>>> ww_develop
... ...
... ... @@ -306,9 +306,6 @@ seajs.config({
'jquery-2.1.3': 'lib/jquery-2.1.3'
<<<<<<< HEAD
},*/
=======
},
>>>>>>> ww_develop
base: 'http://localhost:8000/',
charset: 'utf-8'
});
... ...
... ... @@ -18,18 +18,15 @@
"dependencies": {
"jquery": "~1.8.3",
"lazyload": "~1.9.6",
"yoho.swiper": "~2.7.0",
"yoho-idangerous.swiper": "~0.0.2",
"box": "~0.0.0",
"yoho-box": "~0.0.1",
"yoho.swiper": "2.7.0",
"yoho-idangerous.swiper": "0.0.2",
"box": "0.0.0",
"yoho-box": "0.0.1",
"yoho-tools": "~0.0.4",
"yoho-tips": "~0.0.1",
"jquery-ui": "~1.11.1",
"yoho-tips": "0.0.1",
"mustache": "2.0.0",
"yoho-idangerous.swiper": "0.0.2",
"jquery.autocomplete": "0.0.2",
"mlellipsis": "0.0.2",
"jquery.autocomplete": "~0.0.2"
"jquery.autocomplete": "~0.0.2",
"mlellipsis": "0.0.2"
},
"devDependencies": {
"expect.js": "0.3.1"
... ...