|
@@ -1,9 +1,8 @@
|
|
// 添加公共UI
|
|
// 添加公共UI
|
|
addUI("control",function(){ //加载control回调
|
|
addUI("control",function(){ //加载control回调
|
|
- var controlO = new controlF();
|
|
|
|
|
|
+ var controlObj = new controlF();
|
|
$("#control").show();
|
|
$("#control").show();
|
|
- console.log("加载control回调")
|
|
|
|
- controlSuccess() //load完公共部分在load其他
|
|
|
|
|
|
+ controlSuccess()//load完公共部分在load其他
|
|
});
|
|
});
|
|
function controlF(){
|
|
function controlF(){
|
|
function lang(){ //语言初始化
|
|
function lang(){ //语言初始化
|
|
@@ -15,6 +14,7 @@ function controlF(){
|
|
$("#control_search .hot .tit").text(currentLang.co0005)
|
|
$("#control_search .hot .tit").text(currentLang.co0005)
|
|
}
|
|
}
|
|
lang();
|
|
lang();
|
|
|
|
+ //搜索按钮
|
|
$("#control header .search")[0].onclick=function(){
|
|
$("#control header .search")[0].onclick=function(){
|
|
var blockArr = $("#uiLayer>div").not('#control')
|
|
var blockArr = $("#uiLayer>div").not('#control')
|
|
for (var i = 0; i < blockArr.length; i++) {
|
|
for (var i = 0; i < blockArr.length; i++) {
|
|
@@ -25,10 +25,16 @@ function controlF(){
|
|
blockArr.fadeOut("1000",function(){
|
|
blockArr.fadeOut("1000",function(){
|
|
$("#control_search").fadeIn("1000");
|
|
$("#control_search").fadeIn("1000");
|
|
});
|
|
});
|
|
|
|
+ //myEndFunction_focus动画完成后的回调
|
|
var x = $("#control_search .input>div>span")[0];
|
|
var x = $("#control_search .input>div>span")[0];
|
|
x.addEventListener("webkitAnimationEnd", myEndFunction_focus);
|
|
x.addEventListener("webkitAnimationEnd", myEndFunction_focus);
|
|
x.addEventListener("animationend", myEndFunction_focus);
|
|
x.addEventListener("animationend", myEndFunction_focus);
|
|
|
|
+
|
|
|
|
+ $("#uiLayer footer").hide("slow");
|
|
|
|
+ var footer = $("#uiLayer footer").detach()
|
|
function myEndFunction_focus() {
|
|
function myEndFunction_focus() {
|
|
|
|
+ $("#uiLayer").append(footer);
|
|
|
|
+ $("#uiLayer footer").fadeIn("slow");
|
|
$("#control_search .input>div>p>input")[0].focus()
|
|
$("#control_search .input>div>p>input")[0].focus()
|
|
}
|
|
}
|
|
// 关闭搜索UI
|
|
// 关闭搜索UI
|
|
@@ -42,4 +48,17 @@ function controlF(){
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //头像按钮
|
|
|
|
+ $("#control header .avatar")[0].onclick=function(){
|
|
|
|
+ console.log("头像按钮")
|
|
|
|
+ }
|
|
|
|
+ //购物车侧拉按钮
|
|
|
|
+ $("#control header .cart")[0].onclick=function(){
|
|
|
|
+ console.log("购物车侧拉按钮")
|
|
|
|
+ }
|
|
|
|
+ //菜单侧拉按钮
|
|
|
|
+ $("#control header .menu")[0].onclick=function(){
|
|
|
|
+ $("#control_menu").css('display', 'block');
|
|
|
|
+ console.log("菜单侧拉按钮")
|
|
|
|
+ }
|
|
}
|
|
}
|