I am using the idtabs script from http://www.sunsean.com/idTabs/ and so far they work awesome. However, I am looking for a way to make it so that when the page reloads, the same tab that was selected is still open. So far i'm thinking there must be a way to set the .selected class to assign the default tab. I'm a huge js rookie so any ideas would be greatly appreciated.
A:
You probably need to setup some kind of state persistence in your page so when you refresh the page, the tab you are currently on is not lost.
You could try using cookies like in this example :
http://jqueryui.com/demos/tabs/#cookie
You could also look at this SO post for anotherway to accomplish what you want :
http://stackoverflow.com/questions/574699/selecting-a-jquery-tab-using-a-parameter-in-the-url
I suggest you use a library like JQueryUI instead of the first one you come by googling. JQueryUI has more chance to last the test of time.
Good luck.
Philippe
2010-06-15 16:11:34
Thanks. My next move was going to be moving to ui.
Colin Morgan
2010-06-15 16:25:09
A:
If you want the page to reload then it doesn't make sense using tabs because you obviously know the action based on which can set the class.
Prashanth
2010-06-15 16:14:08
it's pagination in WordPress. Whenever the page is changed it loads but it reverts to the default tab.
Colin Morgan
2010-06-15 16:21:38