Jquery location hash change
Posted on 2012-03-31
I have a menu with 5 li > a items.
Each item when clicked launches a jquery function.
With each menu click I would like to update the location.hash like for example:
click item 1 > function one() is called and location hash gets a #one appened at the end
click item 2 > function two is called and location hash gets a #two appened at the end
and so on
Also, and this is the most important part, if I manually changed the URL of the page from let's say: siteURL#one to siteURL#two, then automatically the function two() should be called.
Is this possible?
Thanks in advance