0

I have a website that I've been building off of a template. It uses buttons that scroll down the page with hashes, but the hashes aren't displayed in the URL in the address bar.

I want to know what code I could use in javascript to retrieve the hash of the section of the page that's currently being viewed. I've already tried:

window.location.hash document.location.hash location.hash

But these all return undefined.

Is there a way to unhide the hash in the address bar? Or to retrieve it internally somehow?

The template I'm using can be found here: http://quickwebresources.com/demo/portfolio/

namster2k
  • 1
  • 1
  • http://stackoverflow.com/questions/3338642/updating-address-bar-with-new-url-without-hash-or-reloading-the-page – Danny Jan 29 '15 at 13:02
  • Sorry, my brain is fried at the moment. Can you point me out to the exact code required to achieve what I'm trying to do? I've been reading for hours now trying to figure this out. – namster2k Jan 29 '15 at 13:51
  • @Danny, the link you provided tells you how to change the URL. But it doesn't explain how to retrieve the hash location (if the URL had been changed). How can I use `window.history.pushState` to retrieve the hash info I need? – namster2k Jan 30 '15 at 05:28

0 Answers0