Authored by whb

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohood.git into develop

... ... @@ -13,6 +13,7 @@
<body>
<div class="mobile-wrap">
<div class="hd">
<div class="header-download-wrap">
<div class="header-download clearfix">
<div class="tip-pic"></div>
<div class="tip-info">
... ... @@ -22,6 +23,7 @@
</div>
<span class="tip-close"></span>
</div>
</div>
<h1 class="logo iconfont"><a class="back-btn iconfont" href="javascript:;">&#xe60f;</a>&#xe60b;</h1>
</div>
<div class="bd">
... ... @@ -115,7 +117,7 @@
<script type="text/javascript" src="../../../res/js/lib/seajs.js"></script>
<script type="text/javascript">
seajs.use(['zepto', 'mobile'],function($, mobile){
//mobile.common();
mobile.common();
mobile.brand();
})
</script>
... ...
... ... @@ -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;
... ...