尝试这个。
/* Every time the window is scrolled ... */
jQuery(window).scroll( function(){
/* Check the location of element */
jQuery('.hideme').each( function(i){
var logo = jQuery(this).outerHeight();
var position = jQuery(window).scrollTop();
/* fade out */
if( position > logo ){
jQuery(this).animate({'opacity':'0'},500);
}else{ jQuery(this).animate({'opacity':'1'},500);}
});
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句