javascript - Checking which span element is currently on the screen or the closest to it upwards -
this question has answer here:
- check if element visible after scrolling 37 answers
i'm trying see span element visible on screen or closest upwards, i'm not sure how achieve this. page scroll able , spans visible. there selector visible on screen ?
guess, should compare window.scrolltop() , element scrolltop values. p.s. not forget include element height
Comments
Post a Comment