Chris Moguel
Chris Moguel

Reputation: 191

Passing selected option in URl to Jquery UI tabs

Is there a way that i can link to a page containing a jquery ui tab set and pass the selected variable in the url link to automatically show a particular tab depending in which link was clicked to reach the page?

Upvotes: 2

Views: 450

Answers (1)

Swizec Teller
Swizec Teller

Reputation: 2322

Yes, you can do this by constructing the url like so http://jqueryui.com/demos/tabs/#tabs-2

Essentially you are passing the id of the tab's content div after the hash. It worked on Chrome, but it should probably work everywhere.

Upvotes: 2

Related Questions