Q:

Use javascript/jquery to append URL?

Is it possible to use javascript/jquery to append something on the end of a url when a link is clicked?
For example, I have 5 tabs on a page (product.php), when I click a tab, then that tab opens.  What I want to do is have the URL change to product.php#tab-3 (or whichever number tab is clicked) when you click on it.
The reason I am doing this is so that users will be able to bookmark the page on a specific tab.
Thanks

A:

No need to use JavaScript:
<a href="#tab3">click</a>

You can still use JavaScript if you need it though:
location.hash = "tab3";

