Commit dfbe1142 by 王东红

fix

parent 51184b00
...@@ -55,6 +55,25 @@ define([ ...@@ -55,6 +55,25 @@ define([
this.delay = this.options.delay; 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; // var len = $(".navigation ul li.level-top").length;
// console.log(len) // 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