window.onmousewheel = document.onmousewheel=function (e) {
console.log('aaa')
var valueoffsetT = $('.value-box').offset().top;
var ST = $('body').scrollTop();
var windowH = $(window).height();
console.log(valueoffsetT,ST,windowH)
var courseoffsetT = $('.course-box').offset().top;
var ST = $('body').scrollTop();
var windowH = $(window).height();
if (valueoffsetT - ST - windowH < -40) {
$('.value-box').show();
$('.value-box').addClass('fadeInUp ');
}
if (courseoffsetT - ST - windowH < -15) {
$('.course-box').show();
$('.course-box').addClass('fadeInUp ');
}
};
用$(window).scroll在火狐下不行 上面这么写也不行 怎么写才能更好的兼容呢
侃侃无极
相关分类