Assume I have following markup:
<div id ="About" style="height: 2000px">
About
</div>
<div id="Work" style="height: 2000px">
Work
</div>
When I run location.hash = 'Work'; the browser jumps right to the position of the “Work” element. I was expecting that behaviour with an anchor tag with a name attribute. But in our case it is a div container with an ID. I tested this in IE8/9 and Chrome.
Why does the browser jumps to the div container when changing the hash?
For your convenience I openend a jsFiddle.
It is a feature. It is designed so and you can read about it in rfc2854. Let me quote it for you: