plugins/gallery/gallery-bits.js
author Dan
Thu, 29 Jan 2009 01:30:09 -0500
changeset 29 205d0534a0f2
parent 10 b38afb86dcad
child 42 7c6e2e97aa08
permissions -rw-r--r--
Fixed a few issues with the img_tags column; added some checks for Enano 1.1.x

/*
 * Misc functions for Snapr.
 */

function gal_toggle(elem, img, img_open, img_close)
{
  if ( !img_close || !img_open )
  {
    img_close = scriptPath + '/plugins/gallery/toggle-closed.png';
    img_open  = scriptPath + '/plugins/gallery/toggle-open.png';
  }
  if ( elem.style.display == 'none' || !elem.style.display )
  {
    elem.style.display = 'block';
    try {
      img.src = img_open;
    } catch(e) {};
  }
  else
  {
    elem.style.display = 'none';
    try {
      img.src = img_close;
    } catch(e) {};
  }
}