First off I would like to thank ccs-tricks for the awesome Dynamic Page / Replacing Content tutorial. It works awesome for what I need. I dig it. Here is the link to the tutorial I used for the code in my site. http://css-tricks.com/dynamic-page-replacing-content
I have one question though. On my contact page I would like to have a google map. The map loads without the hash in the url, when navigated to with hash the map fails to load.
I don’t know the proper event or how to properly ask if(window.location == “#”). I have tried to call the initializeGoogleMap(‘mapCanvas’) function in the body without the onload event but that fails with hash but loads just fine without # as well.
Thanks, it helped me learn how to get the hash value of the URL. But I still have the same problem of scope. Since the window and the body are not being reloaded no functions are fireing on hashed URL’s.
Is there a way to addEventListener() to a div and on change to say innerHTML fire off desired functions?