'Detect scroll-event on every parent-element
I have a directive which should detect a scroll-event on every parent element. The scrollable element could be div with overflow:scroll or the browser-window itself. So this solution does not work in all cases:
angular.element($window).bind("scroll", function() { ... });
Solution 1:[1]
You need to add some specific height for the div elements to scroll
For example:
div{
height: 350px; // Specify div height as you want
overflow: scroll;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Viswanath Donthi |
