Solved

Jquery location hash change

Posted on 2012-03-31
1
643 Views
Last Modified: 2012-04-01
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
0
Comment
Question by:badwolfff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
animecyc earned 500 total points
ID: 37791904
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Do I need to force my browser to see my new Favicon 4 50
JQuery & Classic ASP 10 41
Add Rows on a Table 8 54
Ajax calendar distorted 4 21
This article discusses how to create an extensible mechanism for linked drop downs.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question