Jquery Hashchange not working properly?

368 Views Asked by At

Maybe i am just up too late, but If you click "about us" then start clicking the nav links (if you don't close it) it works just fine...however, when the page loads, ONLY the about us link works correctly.

Here is the draft up and running: http://www.pixeltweaks.com/ground_zero

I am sure it is something simple that i am just not able to pick up on, perhaps one of you more seasoned vets can be of assistance.

Thanks guys.

1

There are 1 best solutions below

0
On

Hashchanges works as expected. But you call your custom function getDomain somewhere which is defined only on the about us page:

function getDomain(url) {
   return url.match(/:\/\/(.[^/]+)/)[1];
}

On other pages it throws an error: Uncaught ReferenceError: getDomain is not defined.