dojo.window.scrollIntoView

since:V1.5

Scrolls a node into view, similar to node.scrollIntoView() but working around browser quirks.

Examples

Two buttons

dojo.require("dojo.window");
<button type=button id=button1 onclick="dojo.window.scrollIntoView('button2');">scroll to button 2</button>
<div style="height: 500px; border: 1px solid black">
    div to separate buttons
</div>
<button type=button id=button2 onclick="dojo.window.scrollIntoView('button1');">scroll to button 1</button>
Error in the documentation? Can’t find what you are looking for? Let us know!