GMail style lists
- Started
- Last post
- 12 Responses
- toastie
does anyone know how to do the expanding divs that Gmail uses for expanding conversations?
- k0na_an0k0
no sorry. :(
don't hate me cause i only know frames.
- son0
up!
i wanna know too
- toastie0
im experimenting with some stuff, so maybe ill get it to work, but if anyone knows any good ways, post em here.
- unfittoprint0
put your desired content within a div.
use a javascript event [onclick] on an outside link. check if your target's div display attribute is set to "none". if true set it to "", if not set it to "none".
- welded0
There's a nice little script that does this exact thing on ALA somewhere. I've been using it with great effect.
- nRIK0
be sure to post it :)
- welded0
Here's the javascript:
// toggle visibility
function toggle(targetId){
if (document.getElementById){
target = document.getElementById( targetId );
if (target.style.display == "none"){
target.style.display = "hidden";
} else {
target.style.display = "none";
}
}
}Here's a typical link:
[a href="javascript:void(0);" onclick="toggle('uniqueIDofDiv... return false;"]Blah[/a]This technique works great and is very, very easy to modify to suit a particular task. (Now let's just see how NT parses the code...)
- toastie0
thank you fellas, that worked very well. much love. And, if anyone is going to use it, unfit got it right, you set the div's display to "", not "hidden" when you hide it.
- Ginja0
toastie, I have something that does the same thing and works using DIVs.
I can mail it to you when I get home if you like?
If you do, please mail me to remind me.
- toastie0
nah, i got everything working just great, and this is using divs too. thank you though :)
- gravityroom0
Just curious...
Did anyone bother to go into Gmail and view the code?
- toastie0
hehe, try it, it's some crazy coding.