Hi,
I can confirm that the code on the following page will enable
persistence between page loads:
http://dev.jqueryui.com/ticket/3613Using this exact accordion (
http://jqueryui.com/demos/accordion/), I
replaced...
$("#accordion").accordion({
header: "h3",
autoHeight: false
});
With...
var accordion = $("#accordion");
var index = $.cookie("accordion");
var active;
if (index !== null) {
active = accordion.find("h3:eq(" + index + ")");
} else {
active = 0
}
accordion.accordion({
header: "h3",
event: "click hoverintent",
active: active,
change: function(event, ui) {
var index = $(this).find("h3").index ( ui.newHeader[0] );
$.cookie("accordion", index, {
path: "/"
});
},
autoHeight: false
});
Also, you need to reference the jQuery cookie plugin:
<script src="jquery-1.2.1.min.js" type="text/javascript"></script>
<script src="jquery.cookie.js" type="text/javascript"></script>
Voila!