...
|
...
|
@@ -19,8 +19,11 @@ define('mobile', function(require, exports) { |
|
|
if ($('.header-download').size() > 0) {
|
|
|
downloadH = $('.header-download').height();
|
|
|
//顶部app下载位置
|
|
|
console.log(!$('.search-wrap input').hasClass('show'));
|
|
|
|
|
|
$(window).on('scroll', function() {
|
|
|
scrollTop = $(window).scrollTop();
|
|
|
if (!$('.search-wrap input').hasClass('show')) {
|
|
|
if (scrollTop >= downloadH) {
|
|
|
$('.header-download').addClass('fix');
|
|
|
$('.header-download-wrap').addClass('show');
|
...
|
...
|
@@ -28,7 +31,9 @@ define('mobile', function(require, exports) { |
|
|
$('.header-download').removeClass('fix');
|
|
|
$('.header-download-wrap').removeClass('show');
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
...
|
...
|
@@ -107,12 +112,13 @@ define('mobile', function(require, exports) { |
|
|
$('.search-wrap input').on('focus', function() {
|
|
|
var offsetTop = $('.search-wrap').offset().top;
|
|
|
$('.overlay').addClass('show');
|
|
|
if ($('.header-download').hasClass('fix')) {
|
|
|
offsetTop = $('.header-download').outerHeight();
|
|
|
}
|
|
|
$(this).removeClass('show').addClass('show');
|
|
|
|
|
|
$('body,html').animate({
|
|
|
scrollTop: offsetTop
|
|
|
});
|
|
|
|
|
|
|
|
|
});
|
|
|
$('.search-wrap').find('input').on('keyup', function(event) {
|
|
|
var keycode = event.which;
|
...
|
...
|
|