includes/clientside/static/sliders.js
changeset 363 2220bab5c784
parent 362 02d315d1cc58
child 582 a38876c0793c
equal deleted inserted replaced
361:35ed07abc99e 363:2220bab5c784
    27         // get the original height
    27         // get the original height
    28         var baseheight = (ie) ? divs[i].offsetHeight + "px" : document.defaultView.getComputedStyle(divs[i], null).getPropertyValue('height', null);
    28         var baseheight = (ie) ? divs[i].offsetHeight + "px" : document.defaultView.getComputedStyle(divs[i], null).getPropertyValue('height', null);
    29 
    29 
    30         // use cookies to toggle whether to display it or not
    30         // use cookies to toggle whether to display it or not
    31         var id = ( divs[i].parentNode.firstChild.nextSibling ) ? divs[i].parentNode.firstChild.nextSibling.firstChild : divs[i].parentNode.parentNode.firstChild.nextSibling.firstChild;
    31         var id = ( divs[i].parentNode.firstChild.nextSibling ) ? divs[i].parentNode.firstChild.nextSibling.firstChild : divs[i].parentNode.parentNode.firstChild.nextSibling.firstChild;
       
    32         
       
    33         if ( !id.nextSibling )
       
    34           return;
    32         
    35         
    33         if(id.innerHTML || id.nextSibling.length < 1) id = id.innerHTML;
    36         if(id.innerHTML || id.nextSibling.length < 1) id = id.innerHTML;
    34         else id = id.nextSibling.innerHTML; // Gecko fix
    37         else id = id.nextSibling.innerHTML; // Gecko fix
    35         
    38         
    36         var cookieName = 'mdgSliderState_'+i; // id.replace(' ', '_');
    39         var cookieName = 'mdgSliderState_'+i; // id.replace(' ', '_');