File: hideable.js

package info (click to toggle)
horde3 3.3.8%2Bdebian0-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 34,220 kB
  • ctags: 28,224
  • sloc: php: 115,191; xml: 4,247; sql: 2,417; sh: 147; makefile: 140
file content (1 line) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (2)
1
function Horde_Hideable(){this.id=arguments[0];this.element=document.getElementById(this.id);if(arguments.length==2){this.displayStyle=arguments[1]}}Horde_Hideable.prototype={id:null,element:null,displayStyle:"block",shown:function(){return this.element.style.display!="none"},hide:function(){this.element.style.display="none";return this},show:function(){this.element.style.display=this.displayStyle;return this},toggle:function(){return this.shown()?this.hide():this.show()}};