Reputation: 48953
I need jQuery tabs that will also work with a URL
Example I have a profile page url.com/profile.php?u=1 on this profile page I have some tabs, friends, comments, about, and these tabs load the appropriate page into them using jquery and ajax.
Now I would like to make it where I could also go to a special URL and it will load the appropriate tab. like go to url.com/profile.php?u=1&p=friends and the profile page would load but the friends tab would be loaded already.
Is there an easy way to do this?
I was completely lost but as I typed this question 1 idea came to mind, I could, in my php page set it to use differnt jquery code depending on the page in the URL.
Is there other ways?
PS) I do not want to use jqueryUI
Upvotes: 1
Views: 233
Reputation: 11977
The url.com/profile.php?u=1&p=friends should render the content of the friends tab and have it initially selected. You can adjust your tabstrip implementation so that it takes into account such markup and don't load its content through ajax.
Upvotes: 1