views:

789

answers:

1

I've got a couple of tabs on my page and I'd like the switching between them to be back-button-able

My idea was to let the tab-buttons link through to #tab1 and #tab2, and then let jquery pick up the #tabX and show/hide the relevant tab.

Is this possible? How can i get access to the #whatever in the url from jquery/javascript?

Thanks

Andrew

+1  A: 

You're looking for

location.hash

You might also save a lot of time by looking at this jquery history plugin. Good luck!

Magnar
Excellent Smithers!
Andrew Bullock
fyi that plugin is bugged with jquery 1.3.2 in chrome :(
Andrew Bullock