Browsable API tab preferences should be site-wide

This commit is contained in:
Tom Christie 2013-08-30 09:20:12 +01:00
parent cba972911a
commit f3ab0b2b1d

View File

@ -36,12 +36,12 @@ $('a[data-toggle="tab"]:not(:first)').on('shown', function (e) {
});
$('a[data-toggle="tab"]').click(function(){
document.cookie="tab=" + this.name;
document.cookie="tabstyle=" + this.name + "; path=/";
});
// Store tab preference in cookies & display appropriate tab on load.
var selectedTab = null;
var selectedTabName = getCookie('tab');
var selectedTabName = getCookie('tabstyle');
if (selectedTabName) {
selectedTab = $('.form-switcher a[name=' + selectedTabName + ']');