Commit b586e920 by lmf

Merge branch 'master' of http://47.99.244.21:9999/root/joshine

parents 0779a20b dfbe1142
......@@ -1202,6 +1202,7 @@ footer{
margin-left: 2px;
}
.navigation .active>a.level-top, .navigation .has-active>a.level-top{
background:none;
}
......@@ -2108,6 +2109,15 @@ background-color: #000;
width: 81%;
margin: 0 auto;
}
.scroll-active{
background: #ffffff;
z-index: 1000;
width: 100%;
position: fixed;
padding-right: 20px;
top: 0;
transition: transform .3s;
}
}
span.swatch-attribute-selected-option{
......
......@@ -55,6 +55,25 @@ define([
this.delay = this.options.delay;
var position = $(window).scrollTop();
$(window).scroll(function() {
var scroll = $(this).scrollTop();
console.log(scroll)
if(scroll > position) {
//top
$('.scroll-active').css("box-shadow","unset");
$('.header-top.header-fixed').removeClass('scroll-active');
} else {
if(scroll > 80){
$('.header-top.header-fixed').addClass('scroll-active');
$('.scroll-active').css("box-shadow","0 6px 12px 0 rgb(0 0 0 / 4%)");
} else {
$('.scroll-active').css("box-shadow","unset");
$('.header-top.header-fixed').removeClass('scroll-active');
}
}
position = scroll;
});
// var len = $(".navigation ul li.level-top").length;
// console.log(len)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment