jquery手风琴曲奇/持久性

时间:2012-07-28 14:56:12

标签: jquery cookies persistence accordion

我想用jquery.cookie保存手风琴菜单的状态(打开/关闭)。 有人可以帮我设置cookie吗?

$('#menu').children('[data-header]').hide().each(function() {
    $(this).before('<h3 class="menu-header">' + $(this).data('header') + '</h3>');
}).prev().on("click", function() {
    $(this).toggleClass('on').next().slideToggle();
  });

1 个答案:

答案 0 :(得分:0)

问题在这里得到解决:http://jsfiddle.net/tovic/EDQn9/12/
感谢来自css-tricks.com的Hompimpa

相关问题