Excellence WebMenu Maker
htmlship1_ad.gif (6211 字节)
HtmlShip
 
Excellence Html Compress
 
OO Picture Game
Hot Software
Wav to mp3 Software
Excellence Killer
Hot Link
Uxiu Software
WebPictures Downloader

Java menu script>Menu Make>Contractible Headers Script

Description: A script that makes selected headers in a page contractible. Contents such as text, graphics, tables etc can be hidden inside the header that will be revealed only when the header is clicked on. All other browsers, including NS 4.x, will simply see the headers uncontracted (degrades well)
<script language="JavaScript1.2">
<!--

/******************************************
* Contractible Headers Script- ?Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/

var ns6=document.getElementById&&!document.all?1:0

var head="display:''"
var folder=''

function expandit(curobj){
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+1].style
if (folder.display=="none")
folder.display=""
else
folder.display="none"
}

//-->
</script>

<h3 style="cursor:pointer; cursor:hand" onClick="expandit(this)">Header 1</h3>
<span style="display:none" style=&{head};>
This is content under Header 1.
</span>
<h3 style="cursor:pointer; cursor:hand" onClick="expandit(this)">Header 2</h3>
<span style="display:none" style=&{head};>
This is content under Header 2.
</span>

 

The above code creates two headers, each with contents "stuffed" inside. To add additional headers, add more of the following to the existing code:

<h3 style="cursor:pointer; cursor:hand" onClick="expandit(this)">Header 1</h3>
<span style="display:none" style=&{head};>
This is content under Header 1. Insert anything in here, such as text, tables, etc..</span>

With the parts in red representing the parts you should change to reflect your own layout.

 

Copyright © 2002-2003 Excellence Software, Inc.All rights reserved.