0

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:

  1. Scroll event is not fired inside directive - angular.js

  2. Scroll event is not firing

I have even added the overflow: scroll; class to main div, as per suggested by the second url

What am I missing here

1 Answer 1

1

you are not scrolling the element itself. you are scrolling the document, so it should be something like:

$document.bind('scroll', ...)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.