Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One could argue if that is "style" or "behaviour".


I mean I want that button to disappear when the page is already scrolled to the top. The scrolling up part I'm fine with making with JS. I just don't feel right about attaching a scroll handler to have a very unoptimized implementation of such a thing since that scroll handler will fire EVERY SINGLE SCROLL. But the browser could optimize away "is document at the top" CSS calls by knowing we scrolled down (and by definition we can't be at the top then).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: