How to scroll the browser to the desired item by javascript?


The question is simple.

How to scroll browser to desired element or desired position by javascript?

Thanks a lot for the help!

To an element :


Has cross browser support and probably the easiest way to do it ....

or to a specific position :


Docs for window.scroll() here