Reputation: 17494
I have made one Plunker where I want to hide To The Top button initially and the show it when the screen is scrolled down. I am not able to capture scroll
event inside directive. I have followed below Urls:
I have even added the overflow: scroll;
class to main div, as per suggested by the second url
What am I missing here
Upvotes: 0
Views: 434
Reputation: 26156
you are not scrolling the element itself. you are scrolling the document, so it should be something like:
$document.bind('scroll', ...)
Upvotes: 1