var isBottom=($(document).scrollTop()>=$(document).height()-$(window).height());
這里之所以會(huì)用>=
,是因?yàn)榭赡軙?huì)進(jìn)行浮點(diǎn)數(shù)比較。
var isBottom=($(document).scrollTop()>=$(document).height()-$(window).height());
這里之所以會(huì)用>=
,是因?yàn)榭赡軙?huì)進(jìn)行浮點(diǎn)數(shù)比較。