jQuery实现页面下拉出现悬浮窗口的方法

$(function(){
$(window).scroll(function() {
if($(window).scrollTop() >= 450){ //向下滚动像素大于这个值时,即出现浮窗~
$(‘#catalog‘).fadeIn(300); //浮窗淡入的时间,越小出现的越快~
}else{
$(‘#catalog‘).fadeOut(300); //浮窗淡出的时间,越小消失的越快~
}
});
$(‘.actGotop‘).click(function(){$(‘html,body‘).animate({scrollTop: ‘0px‘}, 800);}); //浮窗动画停留时间,越小消失的越快~
});

 

jQuery实现页面下拉出现悬浮窗口的方法

上一篇:用什么保护php代码安全?screw plus可以!


下一篇:HTTP协议简介