/* 搜烦 */
var helangSearch={
els:{},
searchIndex:0,
init:function(){
var _this=this;
this.els={
pickerBtn:$(".picker"),
pickerList:$(".picker-list"),
logo:$(".logo"),
hotList:$(".hot-list"),
input:$("#search-input"),
button:$(".search---")
};
/* 讄热门搜烦列表 */
this.els.hotList.html(function () {
var str='';
$.each(_this.hot.list,function (index,item) {
str+=''
+''+(index+1)+'
'
+''+item+'
'
+'';
});
return str;
});
/* 注册事g */
/* 搜烦cd选择按钮 */
this.els.pickerBtn.click(function () {
if(_this.els.pickerList.is(':hidden')) {
setTimeout(function () {
_this.els.pickerList.show();
},100);
}
});
/* 搜烦cd选择列表 */
this.els.pickerList.on("click",">li",function () {
_this.els.logo.css("background-image",('url(img/'+$(this).data("logo")+')'));
_this.searchIndex=$(this).index();
_this.els.pickerBtn.html($(this).html())
});
/* 搜烦 输入?点击*/
this.els.input.click(function () {
if(!$(this).val()){
setTimeout(function () {
_this.els.hotList.show();
},100);
}
});
/* 搜烦 输入?输入*/
this.els.input.on("input",function () {
if($(this).val()){
_this.els.hotList.hide();
}
});
/* 搜烦按钮 */
this.els.button.click(function () {});
/* 文 */
$(document).click(function () {
_this.els.pickerList.hide();
_this.els.hotList.hide();
});
}
};
var helangSearchCopy={
els:{},
/* 搜烦cd序号 */
searchIndex:0,
/* 初始?*/
init:function(){
var _this=this;
this.els={
pickerBtn:$(".picker01"),
pickerList:$(".picker-list01"),
logo:$(".logo"),
hotList:$(".hot-list"),
input:$("#search-inputCopy"),
button:$(".search")
};
/* 讄热门搜烦列表 */
this.els.hotList.html(function () {
var str='';
$.each(_this.hot.list,function (index,item) {
str+=''
+''+(index+1)+'
'
+''+item+'
'
+'';
});
return str;
});
/* 注册事g */
/* 搜烦cd选择按钮 */
this.els.pickerBtn.click(function () {
if(_this.els.pickerList.is(':hidden')) {
setTimeout(function () {
_this.els.pickerList.show();
},100);
}
});
/* 搜烦cd选择列表 */
this.els.pickerList.on("click",">li",function () {
_this.els.logo.css("background-image",('url(img/'+$(this).data("logo")+')'));
_this.searchIndex=$(this).index();
_this.els.pickerBtn.html($(this).html())
});
/* 搜烦 输入?点击*/
this.els.input.click(function () {
if(!$(this).val()){
setTimeout(function () {
_this.els.hotList.show();
},100);
}
});
/* 搜烦 输入?输入*/
this.els.input.on("input",function () {
if($(this).val()){
_this.els.hotList.hide();
}
});
/* 搜烦按钮 */
this.els.button.click(function () {});
/* 文 */
$(document).click(function () {
_this.els.pickerList.hide();
_this.els.hotList.hide();
});
}
}; 99视频在线精品免费_亚洲乱码一区二三四区ava_mm1313亚洲国产精品无码_色偷偷91综合久久噜噜噜