Tabs: Fixed id generation for cookies.

Fixes #5264 - cookie name is: "ui-tabs-[object Object]".
This commit is contained in:
Scott González 2010-03-04 02:36:43 +00:00
parent b636ad6997
commit 0de9895595

View File

@ -13,7 +13,8 @@
*/
(function($) {
var tabId = 0;
var tabId = 0,
listId = 0;
$.widget("ui.tabs", {
options: {
@ -63,7 +64,7 @@ $.widget("ui.tabs", {
},
_cookie: function() {
var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + $.data(this.list[0]));
var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + (++listId));
return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
},