looked around here, but didn’t find straightforward answer..
I’m using cookies, to store last selected tab:
$(function() {
$( "#tabs" ).tabs({
cookie: {expires: 365},
load: function(event, ui) {
// console.log("load event ran");
$('a', ui.panel).live("click", function() {
$(ui.panel).load(this.href);
return false;
});
},
select: function(event, ui) {
var url = $.data(ui.tab, 'load.tabs');
if( url ) {
location.href = url;
return false;
}
return true;
/* var current_index = $("#tabs").tabs("option","selected");
$("#tabs").tabs('load',current_index); */
}
});
});
which does work, but after cookie is set and i try to select a different tab – it changes url in the address box of the browser, but doesn’t actually go to the selected tab.
you can see both ways (one is commented) i tried to implement on select event, but both don’t work.
please help?
fixed this by using redirect: