Commit f3ab0b2b by Tom Christie

Browsable API tab preferences should be site-wide

parent cba97291
...@@ -36,12 +36,12 @@ $('a[data-toggle="tab"]:not(:first)').on('shown', function (e) { ...@@ -36,12 +36,12 @@ $('a[data-toggle="tab"]:not(:first)').on('shown', function (e) {
}); });
$('a[data-toggle="tab"]').click(function(){ $('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. // Store tab preference in cookies & display appropriate tab on load.
var selectedTab = null; var selectedTab = null;
var selectedTabName = getCookie('tab'); var selectedTabName = getCookie('tabstyle');
if (selectedTabName) { if (selectedTabName) {
selectedTab = $('.form-switcher a[name=' + selectedTabName + ']'); selectedTab = $('.form-switcher a[name=' + selectedTabName + ']');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment