includes/clientside/static/sliders.js
changeset 855 4f7521dd981f
parent 779 609e35845ec3
child 1227 bdac73ed481e
equal deleted inserted replaced
854:7707f60d4a71 855:4f7521dd981f
     7 pseudocode:
     7 pseudocode:
     8   oninit():
     8   oninit():
     9     i = 0
     9     i = 0
    10     for every div with class "slideblock", do
    10     for every div with class "slideblock", do
    11       if ( cookie['mdgSliderState_' || i] == 'closed' )
    11       if ( cookie['mdgSliderState_' || i] == 'closed' )
    12         hide(div)
    12         div.hide()
    13         
    13         
    14       div.trigger.addEvent onclick():
    14       div.trigger.addEvent onclick():
    15         if ( div.hidden )
    15         if ( div.hidden )
    16           div.show()
    16           div.show()
    17           cookie['mdgSliderState_' || i] = 'open'
    17           cookie['mdgSliderState_' || i] = 'open'
    55     }
    55     }
    56     
    56     
    57     var el = div.previousSibling;
    57     var el = div.previousSibling;
    58     if ( !el )
    58     if ( !el )
    59       continue;
    59       continue;
    60     while ( el.tagName != 'DIV' )
    60     while ( el.tagName == undefined )
    61     {
    61     {
    62       el = el.previousSibling;
    62       el = el.previousSibling;
    63       if ( !el )
    63       if ( !el )
    64         break;
    64         break;
    65     }
    65     }