I\'m using jquery tabs on a web page and when the page is refreshed it loses what ever tab I had been on and goes back to the first tab.
Has anyone come across this
Now that cookie is gone in jQuery UI 1.10.0, I mixed Gayathiri's approach with the new options and events:
// using cookie plugin from https://github.com/carhartl/jquery-cookie
var tabCookieName = "ui-tabs-1";
$(".tabs").tabs({
active : ($.cookie(tabCookieName) || 0);
activate : function( event, ui ) {
var newIndex = ui.newTab.parent().children().index(ui.newTab);
// my setup requires the custom path, yours may not
$.cookie(tabCookieName, newIndex, { path: window.location.pathname });
}
});