2

I'm using the example provided in: http://jsfiddle.net/9R4hZ/40/

to have divs scrolling with mouse wheel. It works fine, but I would like to move 2 divs at the same time, instead of moving them one by one.

Is it feasible?

Kyle Macey
  • 7,949
  • 2
  • 36
  • 77

1 Answers1

0

To update the scroll position of div A when div B gets scrolled, listen for the onscroll event and update the scroll position of the other div.

$('#a').scroll(function(){
    $('#b').scrollTop($(this).scrollTop());
});
Juan Mendes
  • 85,853
  • 29
  • 146
  • 204