|
|
| Script allows developers to easily embed an
expandable/collapsible "content area" (table based) into a
webpage that allows visitors a quick way to hide
unwanted content from display. |
|
-
IE 5.5+ ONLY
- No code is required to be within table elements or
DIV container
- Tables within tables are supported, however, see
below for limitations
- Supports elements inside "content" cell such as <span>
Note: If you require the
content areas to be expanded on initial loading of page
INSTEAD of collapsed then change this line in the .js
file:
var GlobalECState=1 //
0=collapsed, 1=expanded; used for initial state of
ALL branches
Make the variable
GlobalECState 0.
|
|
| Example of one table inside another |
|
| Example of simple layout |
|
| Content Here |
|
| Example of simple layout |
|
|
Content Here
|
Table unaffected by script because it is outside of container DIV
|
|
|
- Installation:
- ALL Tables that you wish to have this feature must be wrapped by
a SINGLE DIV
Example:
<DIV CONTAINER>
<TABLE with FEATURE><ANOTHER TABLE with
FEATURE></TABLE></TABLE>
<ANOTHER TABLE with FEATURE></TABLE>
</DIV>
<TABLE without
FEATURE></TABLE>
- Layout of Table with feature:
- Must have a header row "<TR><TH></TH></TR>"
- Can only have one row after header "<TR><TD>content
area</TD></TR>"
- SINGLE DIV (id is set to "container") is set to be first on the
page
- To change location of this DIV set line 26 from 0
(the first DIV) to reflect the location of the DIV:
document.getElementsByTagName("DIV")[0].setAttribute("id",
"Container");
- For example, if you have multiple DIV's on the page and the
location of this feature is the 4 DIV on the page then
line 26 would be:
document.getElementsByTagName("DIV")[3].setAttribute("id",
"Container");
- Note: On this page the above line is set to 6 because it
is the seventh DIV on the page
(Wow, I seem to like DIV's!)
- Limitations & Known issues:
- Tables can NOT go inside the "content" area of a table with
this feature UNLESS the inside table is setup to contain the
feature itself.
- Source code is commented but not heavily
|
|
|
Download the .zip file containing everything
here
(including +/- images made by 4thorder(TM)) |
|