0

I have html page like this:

<div class="parent">
    <div class="child1">        
        <div class="child2">            
        </div>
    </div>    
</div>

I have scroll event binded to parent and in certain case I want to unbind the scroll event from parent and bind to child element. So I tried this:

angular.element(".parent").unbind('scroll');
angular.element(".child2").bind('scroll', function(){
// some
});

the unbind works but cannot bind it again. Is there a certain way to do that? thank you

Agnosco
  • 155
  • 2
  • 11

1 Answers1

0

There are 3 arguments in angular.bind(), the last one is optional but did you try it with 3 arguments ?? also take a look at this one https://stackoverflow.com/a/30530386/4578345

Community
  • 1
  • 1
Wcan
  • 840
  • 1
  • 10
  • 31