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