【发布时间】:2012-12-05 00:05:37
【问题描述】:
我正在使用带有 jQuery cookie 的 jQuery 选项卡。
我正在使用 jQuery cookie 来保存当前选定的选项卡,我的问题是我在我的项目中使用了很多选项卡,一旦选定的选项卡保存在 cookie 中,所有选项卡都会被保存.
有什么解决办法吗? 我正在考虑为每个页面设置动态 cookie 名称?但是,我该怎么做呢?
$('#tabs').tabs({
cookie: {
expires: 1,
name: // set different cookie name for each #tabs
}});
非常感谢任何建议。
【问题讨论】:
-
对于这类信息我会使用 DOM 存储,en.wikipedia.org/wiki/Web_storage
标签: javascript jquery jquery-tabs jquery-cookie