Simple DIV Layer Expand/Collapse

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
SheDesigns
Forum Commoner
Posts: 42
Joined: Tue Nov 18, 2008 9:51 am
Location: Buffalo, NY

Simple DIV Layer Expand/Collapse

Post by SheDesigns »

I'm looking for a SIMPLE script to expand a collapse a div with a (See More) link. The data is pulled from a database, and displays inside a table cell.
A little bit of information about the product...
[+] Click here to see more!
I just need something simple. Everything I'm finding when I search is super complicated and has too many bells and whistles with accordian effects & backgrounds.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Simple DIV Layer Expand/Collapse

Post by Eran »

A quick google search for 'toggle div javascript' comes up with:
http://www.netlobo.com/div_hiding.html
http://www.harrymaugans.com/2007/03/05/ ... t-and-css/
http://www.dustindiaz.com/seven-togglers/

And those are just the top 3 results
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Simple DIV Layer Expand/Collapse

Post by pickle »

If you don't need animation, just toggle the "display" style from "none" to "block" and back.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply