Better HN
topnewbestaskshowjobs
Log inSign up

nWjbyf45T

2 karma · joined Jul 24, 2017 (9y ago) · 1 submissions

Submissions

comment 9y ago · link · parent

It seems from the code you first stretch it out to Infinity and then when scrollTop is bigger than scrollHeight, you go from negative Infinity back to 1. Negative values of scale() 'mirrors' the element. Maybe make sure scrollTop is never equal to or bigger than scrollHeight.