|
@ -31,28 +31,27 @@ $(document).ready(function() {
|
31
|
31
|
|
32
|
32
|
//搜索框跳转页面
|
33
|
33
|
$("#search").on("click", function() {
|
34
|
|
var searchContent = $("#searchContent").val();
|
35
|
|
setTimeout(function(){location.href = "searchNew.html?searchContent=" + encodeURI(searchContent)},300);
|
36
|
|
|
37
|
|
});
|
38
|
|
$("#search").on("click", function() {
|
39
|
|
var searchContent = $("#searchContent").val().replace(/^\s*|\s*$/,"");
|
|
34
|
var searchContent = $.trim($("#searchContent").val());
|
40
|
35
|
if(searchContent) {
|
41
|
36
|
wlog("kw", searchContent)
|
|
37
|
setTimeout(function(){location.href = "searchNew.html?searchContent=" + encodeURI(searchContent)},300);
|
42
|
38
|
}
|
43
|
39
|
});
|
44
|
40
|
//enter绑定时间
|
45
|
41
|
$("#searchContent").keydown(function(e) {
|
46
|
42
|
if(e.which == 13) {
|
47
|
|
var searchContent = $("#searchContent").val();
|
48
|
|
console.log(searchContent);
|
|
43
|
var searchContent = $.trim($("#searchContent").val());
|
|
44
|
if(searchContent)
|
49
|
45
|
location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
|
50
|
46
|
}
|
51
|
47
|
|
52
|
48
|
})
|
53
|
49
|
$("#hsearchContent").keydown(function(e) {
|
54
|
50
|
if(e.which == 13) {
|
55
|
|
var searchContent = $("#hsearchContent").val();
|
|
51
|
var searchContent = $.trim($("#hsearchContent").val());
|
|
52
|
if(!searchContent) {
|
|
53
|
return;
|
|
54
|
}
|
56
|
55
|
if($(this).siblings()[0].id=="searchh") {
|
57
|
56
|
location.href = "/searchNew.html?searchContent=" + encodeURI(searchContent);
|
58
|
57
|
return;
|
|
@ -62,25 +61,23 @@ $(document).ready(function() {
|
62
|
61
|
})
|
63
|
62
|
|
64
|
63
|
$("#hsearch").on("click", function() {
|
65
|
|
var searchContent = $("#hsearchContent").val();
|
66
|
|
setTimeout(function(){
|
67
|
|
location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
|
68
|
|
},300)
|
69
|
|
|
|
64
|
var searchContent = $.trim($("#hsearchContent").val());
|
|
65
|
if(searchContent) {
|
|
66
|
wlog("kw", searchContent)
|
|
67
|
setTimeout(function(){
|
|
68
|
location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
|
|
69
|
},300)
|
|
70
|
}
|
70
|
71
|
});
|
71
|
72
|
$("#searchh").on("click", function() {
|
72
|
|
var searchContent = $("#hsearchContent").val();
|
|
73
|
var searchContent = $.trim($("#hsearchContent").val());
|
|
74
|
if(searchContent)
|
73
|
75
|
setTimeout(function(){
|
74
|
76
|
location.href = "/searchNew.html?searchContent=" + encodeURI(searchContent);
|
75
|
77
|
},300)
|
76
|
78
|
|
77
|
79
|
});
|
78
|
|
$("#hsearch").on("click", function() {
|
79
|
|
var searchContent = $("#hsearchContent").val().replace(/^\s*|\s*$/,"");
|
80
|
|
if(searchContent) {
|
81
|
|
wlog("kw", searchContent)
|
82
|
|
}
|
83
|
|
});
|
|
80
|
|
84
|
81
|
/*向下滚动时,header背景变半透明*/
|
85
|
82
|
$(document).scroll(function() {
|
86
|
83
|
var top = $(document).scrollTop();
|