:::

6. jquery ui Accordion menu 重新整理後記住所選的選項

$("#accordion").accordion({    
    //set localStorage for current index on activate event
    activate: function(event, ui) {        
        localStorage.setItem("accIndex", $(this).accordion("option", "active"));
    },
    active: parseInt(localStorage.getItem("accIndex"))    
});