Fixed hash jump problem

Added history API with location.hash fallback to avoid page jump in
modern browsers.