0

I have two areas in my html. All two areas can only horizontal scroll. What I want to realize is, if I horizontal scroll one area, another area can get the same horizontal scroll offset. How to realize that in angularjs? I try to use

angular.element(document.getElementById('xxx')).bind('scroll', function() {
   ...
})

But it does no use. Anyone can tell me how?

1

1 Answer 1

1

You could try this angular module. ng-scrollable

It contains the spyX and spyY property where you can control the positions of the scrollbar. You could get the scrollbar position on the first html scrollable and bind it to the second one.

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.