天天看点

操作div滚动条

//监听滚动条,加载数据
		$("#news_list").bind('scroll', function(){
			var h1=$('#news_list').get(0).scrollHeight;//div填充内容后的实际高度
			var h2=$('#news_list').height();//div的可见区域的高度
			var h3=$('#news_list').scrollTop();//被滚动条隐藏的高度
			//console.log(h1+">>"+h2+">>"+parseInt(h3));
			if(h2+parseInt(h3)==h1){
				alert(121);
			}
		});
           

继续阅读