I have two tall and narrow elements of equal height that are next to each other. When I scroll one of these two elements, I want the other to scroll with it.
How can I do this using jQuery? I’ve tried the ScrollTo plugin but the documentation is so bad I can’t figure out how to use it.
This can be accomplished with some simple jQuery, as shown in this example (link).
Basically, you just set the
.scrollTop()of one div to mimick the other on thescroll()event handler: