Jquery location hash change

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
badwolfffAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
animecycConnect With a Mentor Commented:
This is possible both with and without jQuery. One of my favorite plugins to use is this one: jQuery Address

It is both easy to use and very well documented.
0
All Courses

From novice to tech pro — start learning today.