collapse/expand JS
- Started
- Last post
- 8 Responses
- kodap
how do I made a td collapse with a javascript, kinda' like that one (news section) at http://www.lounge72.com ?
any links for free JS source with that?
Thx.
- shutdown0
view source but i never said that
- mitsu0
just give the td an id and in the called function do this:
mytd.style.display="none";
- mitsu0
oh and to expand:
mytd.style.display="";
just check the properties like this:
if(mytd.style.display=="")
{
mytd.style.display="none";
}understand?
- kodap0
ehh. sorry mitsu, not quite there..
I want a td with hidden content and the title is not hidden (ie.: about 12px height ) I want to expand it with an 'onclick' event by clicking the titles the td expands to show all content within...sorry, I'm not a JS guru... :(
- mitsu0
like this?
- kodap0
yeah, that's it, but firstly hidden, then expands, so what do I have to change there?
it's been a tough day, I cant figure out.
thanks a lot I owe you a beer.
- mitsu0
just set the style display to none by default:
- kodap0
thank you very very much mitsu!