mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Tabs: Fixed id generation for cookies.
Fixes #5264 - cookie name is: "ui-tabs-[object Object]".
This commit is contained in:
parent
b636ad6997
commit
0de9895595
5
ui/jquery.ui.tabs.js
vendored
5
ui/jquery.ui.tabs.js
vendored
@ -13,7 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
var tabId = 0;
|
var tabId = 0,
|
||||||
|
listId = 0;
|
||||||
|
|
||||||
$.widget("ui.tabs", {
|
$.widget("ui.tabs", {
|
||||||
options: {
|
options: {
|
||||||
@ -63,7 +64,7 @@ $.widget("ui.tabs", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_cookie: function() {
|
_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)));
|
return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user