jQuery层随滚动条滚动

2010-12-11 07:51:51 | 【

本教程演示了如果通过jQuery简单实现层随着滚动条滚动的效果

jQuery(function(){ 

jQuery(window).scroll(function(){ 

  jQuery('#popping').animate({top:jQuery(document).scrollTop() + jQuery(window).height() - jQuery('#popping').height()},10) 

}); 

jQuery(".close").click(function(){ 

  jQuery("#popping").fadeOut(500); 

}) 

})

相关资源