|
@@ -19,16 +19,21 @@ define('mobile', function(require, exports) { |
|
@@ -19,16 +19,21 @@ define('mobile', function(require, exports) { |
19
|
if ($('.header-download').size() > 0) {
|
19
|
if ($('.header-download').size() > 0) {
|
20
|
downloadH = $('.header-download').height();
|
20
|
downloadH = $('.header-download').height();
|
21
|
//顶部app下载位置
|
21
|
//顶部app下载位置
|
|
|
22
|
+ console.log(!$('.search-wrap input').hasClass('show'));
|
|
|
23
|
+
|
22
|
$(window).on('scroll', function() {
|
24
|
$(window).on('scroll', function() {
|
23
|
scrollTop = $(window).scrollTop();
|
25
|
scrollTop = $(window).scrollTop();
|
24
|
- if (scrollTop >= downloadH) {
|
|
|
25
|
- $('.header-download').addClass('fix');
|
|
|
26
|
- $('.header-download-wrap').addClass('show');
|
|
|
27
|
- } else {
|
|
|
28
|
- $('.header-download').removeClass('fix');
|
|
|
29
|
- $('.header-download-wrap').removeClass('show');
|
26
|
+ if (!$('.search-wrap input').hasClass('show')) {
|
|
|
27
|
+ if (scrollTop >= downloadH) {
|
|
|
28
|
+ $('.header-download').addClass('fix');
|
|
|
29
|
+ $('.header-download-wrap').addClass('show');
|
|
|
30
|
+ } else {
|
|
|
31
|
+ $('.header-download').removeClass('fix');
|
|
|
32
|
+ $('.header-download-wrap').removeClass('show');
|
|
|
33
|
+ }
|
30
|
}
|
34
|
}
|
31
|
});
|
35
|
});
|
|
|
36
|
+
|
32
|
}
|
37
|
}
|
33
|
|
38
|
|
34
|
};
|
39
|
};
|
|
@@ -107,12 +112,13 @@ define('mobile', function(require, exports) { |
|
@@ -107,12 +112,13 @@ define('mobile', function(require, exports) { |
107
|
$('.search-wrap input').on('focus', function() {
|
112
|
$('.search-wrap input').on('focus', function() {
|
108
|
var offsetTop = $('.search-wrap').offset().top;
|
113
|
var offsetTop = $('.search-wrap').offset().top;
|
109
|
$('.overlay').addClass('show');
|
114
|
$('.overlay').addClass('show');
|
110
|
- if ($('.header-download').hasClass('fix')) {
|
|
|
111
|
- offsetTop = $('.header-download').outerHeight();
|
|
|
112
|
- }
|
115
|
+ $(this).removeClass('show').addClass('show');
|
|
|
116
|
+
|
113
|
$('body,html').animate({
|
117
|
$('body,html').animate({
|
114
|
scrollTop: offsetTop
|
118
|
scrollTop: offsetTop
|
115
|
});
|
119
|
});
|
|
|
120
|
+
|
|
|
121
|
+
|
116
|
});
|
122
|
});
|
117
|
$('.search-wrap').find('input').on('keyup', function(event) {
|
123
|
$('.search-wrap').find('input').on('keyup', function(event) {
|
118
|
var keycode = event.which;
|
124
|
var keycode = event.which;
|