How to Change the url of the page when jquery ui tabs is clicked
- by Aakash Chakravarthy
Hello,
I have jquery tabs list like
<ul id="tabsList">
<li><a href="#tab-1">TAB 1</a></li>
<li><a href="#tab-2">TAB 2</a></li>
<li><a href="#tab-3">TAB 3</a></li>
</ul>
and contents for it like
<div id="tab-1">...</div>, <div id="tab-2">...</div>, <div id="tab-3">...</div>
When the tab is clicked, the tab changes correctly.
But i want the id of the tabs be in the url.
i.e when tab 2 is clicked, the URL should change to http://example.com/index.htm#tab-2
when tab 1 is clicked, the URL should change to http://example.com/index.htm#tab-1
How to do this ?