idlesign / ist-ui-panel

jQuery UI Panel (Content Grouping) widget with horizontal and vertical sliding
GNU General Public License v2.0
30 stars 5 forks source link

if cookie enabled and not exist, always collapsed = true #8

Open lynx1983 opened 13 years ago

lynx1983 commented 13 years ago

My solution:


if (o.cookie) {
   var saved_state = self._cookie();
   if (saved_state!=null) {
       if(saved_state==1) {
           o.collapsed = true;
       } else {
           o.collapsed = false;
       }
    }
}