I would like to scroll one element into the center of another element via Javascript. Here is an example:
<div class=container>
<div id=e1>1</div>
<div id=e2>2</div>
...
</div>
How can I scroll a given element into the center of the container? A link to #e4 will almost accomplish it, but it scrolls the element to the top.