Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
Collapse section
Reply
Posted 2006-06-26, 02:05 PM
Chancea are I'll work this one out before I get an answer, just like my rollover thingy, but it's always nice to get some help.

Another little thing for my site (completely new layout if you haven't seen it - www.lenny.x606x.com/ineffable), of course.

What I want is a little section that collapses when you click a button just above that section. In my next update I'm going to try mini feedback forms at the bottom of pages, as well as my main one on my contact page.

The thing I'm going for is a little claret bar, with an up- and down arrow to collapse and 'un-collapse' it.

Example: Top of the Zelaron page shows the members online. There is a little arrow to the right that, when clicked, makes the names disappear ('collapses' the section), and, when clicked again, makes them re-appear ('un-collapses' them).

What I'm wondering is what the HTML code for this is.

10 Brownie points to the person who gives me the correct answer first.
Old
Profile PM WWW Search
Lenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basics
 
 
Lenny
 



 
Reply
Posted 2006-06-27, 10:30 PM in reply to Lenny's post "Collapse section"
Code:
<xhtml>
<head>
<title>Collapse test</title>
<script type="text/javascript">
function ToggleCollapse(sectionid,iconid){
  var theSection=document.getElementById(sectionid);
  var theIcon=document.getElementById(iconid);
  if(theSection.style.display=="block"){
    theSection.style.display="none";
    theIcon.src="opensection.gif";
  }else{
    theSection.style.display="block";
    theIcon.src="closesection.gif";
  }
}
</script>
</head>
<body style="color:black;background-color:white;">
<table style="background-color:black;" cellspacing="1">
<tr><th style="background-color:gray;"><a href="#" style="float:right;" onclick="ToggleCollapse('section1','icon1');return false;"><img src="opensection.gif" border="0" id="icon1" /></a>A title goes here</th></tr>
<tbody id="section1" style="display:none;">
<tr><td style="background-color:gray;">This can be hidden</td></tr>
<tr><td style="background-color:gray;">And span several rows</td></tr>
</tbody>
</table>
</body>
</xhtml>
You'll need to supply your own opensection.gif and closesection.gif.
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2006-06-28, 01:03 PM in reply to WetWired's post starting "<xhtml> <head> <title>Collapse..."
That I can do.

Thanks WW, you're a star.
Old
Profile PM WWW Search
Lenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basics
 
 
Lenny
 



 
Reply
Posted 2006-06-29, 02:33 PM in reply to Lenny's post starting "That I can do. Thanks WW, you're a..."
Lenny said:
That I can do.

Thanks WW, you're a star.
A real regular superstar.

But yea, I was wondering how to do this as well so taht is very helpfull.

Way to be there WW!
"why I've gotta be one of the cool kids just to walk by/
- without being tripped, thrown down on the ground and kicked/
Insulting me for no reason, I was treated like shit/
The teachers let it happen/
I've even seen some of them teachers laughing/
That's why I had a smile on my face when I started blastin/" - Ill Bill - The Anatomy of a School Shooting
Old
Profile PM WWW Search
Original Sin is neither ape nor machine; has so far settled for the in-betweenOriginal Sin is neither ape nor machine; has so far settled for the in-between
 
Original Sin
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 10:14 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.