author | Dan |
Thu, 09 Aug 2007 12:34:39 -0400 | |
changeset 10 | b38afb86dcad |
parent 0 | 7caf561c50ee |
child 42 | 7c6e2e97aa08 |
permissions | -rw-r--r-- |
/* * 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) {}; } }