plugins/gallery/gallery-bits.js
changeset 0 7caf561c50ee
child 10 b38afb86dcad
equal deleted inserted replaced
-1:000000000000 0:7caf561c50ee
       
     1 /*
       
     2  * Misc functions for Enano.Img Gallery.
       
     3  */
       
     4 
       
     5 function gal_toggle(elem, img, img_open, img_close)
       
     6 {
       
     7   if ( !img_close || !img_open )
       
     8   {
       
     9     img_close = scriptPath + '/plugins/gallery/toggle-closed.png';
       
    10     img_open  = scriptPath + '/plugins/gallery/toggle-open.png';
       
    11   }
       
    12   if ( elem.style.display == 'block' )
       
    13   {
       
    14     elem.style.display = 'none';
       
    15     img.src = img_close;
       
    16   }
       
    17   else
       
    18   {
       
    19     elem.style.display = 'block';
       
    20     img.src = img_open;
       
    21   }
       
    22 }
       
    23 
       
    24