...
|
...
|
@@ -19,16 +19,21 @@ 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 (scrollTop >= downloadH) {
|
|
|
$('.header-download').addClass('fix');
|
|
|
$('.header-download-wrap').addClass('show');
|
|
|
} else {
|
|
|
$('.header-download').removeClass('fix');
|
|
|
$('.header-download-wrap').removeClass('show');
|
|
|
if (!$('.search-wrap input').hasClass('show')) {
|
|
|
if (scrollTop >= downloadH) {
|
|
|
$('.header-download').addClass('fix');
|
|
|
$('.header-download-wrap').addClass('show');
|
|
|
} else {
|
|
|
$('.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;
|
...
|
...
|
|