I am using jquery UI 1.10 and I need to enable cookie in tabs. It used to work before.
But despite getting lokely lates jquery cookies 1.31 (https://github.com/carhartl/jquery-cookie/blob/master/jquery.cookie.js) my tabs do not record a correct cookie. It does not change when I switch tabs.
Tabs are initialized as:
$("#tabs").tabs({ cookie: { expires: 30, name: "userprivtabs"} });
Is there any way to make it work?
Thank you in advance!
This Worked for me
$("#tabs").tabs({
activate: function (e, ui) {
$.cookie('selected-tab', ui.newTab.index(), { path: '/' });
},
active: $.cookie('selected-tab')
});