This commit is contained in:
devil_gong 2018-08-23 13:22:30 +08:00
parent 5916ea8e39
commit 3bc28d324a
3 changed files with 53 additions and 9 deletions

View File

@ -983,10 +983,6 @@
<include file="Public/Footer" />
<!-- footer end -->
<!-- nav start -->
<include file="Public/Nav" />
<!-- nav end -->
<script type="text/javascript">

View File

@ -209,13 +209,13 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
/*购物车*/
.tb-btn a {margin-right: 0px;float: left;overflow: hidden; position: relative;width:100%; height: 30px; line-height: 30px;background-color: #FFEDED;
.tb-btn a, .pay li,.pay .pay-opt, .pay span { height: 35px; line-height: 35px; }
.tb-btn a {margin-right: 0px;float: left;overflow: hidden; position: relative;width:100%; background-color: #FFEDED;
color:#F03726;font-size: 14px;text-align: center;}
.tb-btn-basket a {background-color:#F03726;color: #FFF;}
.pay li,.pay .pay-opt{float:left; margin-top:15px;width:33.33% ;height:30px ;}
.pay span{display:inline-block;width: 50%;float: left;font-size:14px ;background:#fff ;line-height:30px ;cursor: pointer;}
.pay li,.pay .pay-opt{float:left; width:33.33%; }
.pay span{display:inline-block;width: 50%;float: left;font-size:14px ;background:#fff ; ;cursor: pointer;}
.tb-detail-hd h1 {padding-bottom:0.4em; line-height: 1;font-size: 14px;font-weight: 600;color: #333; line-height: 20px;}

View File

@ -1488,6 +1488,54 @@ $(document).ready(function() {
}
})
var temp_scroll = 0;
var scroll_type = -1;
var location_scroll = 0;
var nav_status = 1;
$(window).scroll(function()
{
var scroll = $(document).scrollTop();
if(scroll != temp_scroll)
{
var temp_scroll_type = (scroll > temp_scroll) ? 1 : 0;
if(temp_scroll_type != scroll_type)
{
scroll_type = temp_scroll_type;
console.log('不一样了', scroll, temp_scroll, scroll_type, location_scroll)
location_scroll = scroll;
}
if(scroll_type == 1)
{
if(nav_status == 1 && scroll > location_scroll+200)
{
nav_status = 0;
console.log('隐藏导航');
//if(!$("div.pay").is(":visible"))
//{
$("div.pay").slideUp(500);
//}
}
} else {
if(nav_status == 0 && scroll < location_scroll-100)
{
nav_status = 1;
console.log('打开导航');
$("div.pay").slideDown(500);
}
}
temp_scroll = scroll;
}
});
// 小导航
$(window).resize(function()
{
@ -1510,7 +1558,7 @@ function table_nav()
// console.log($(document).width(), dv.css('top'));
// }
// });
// }
}
//导航固定
// $(document).ready(function() {