View Full Version : smooth collapse/expand script
davidbeers
10-10-2002, 04:38 PM
I'm looking for a DHTML script that will enable the user to collapse or expand parts of the page, but to do it using a smooth-rolling "window blind" effect. I've searched the archives here and haven't found anything like this. Anyone know of something like this?
TIA for any suggestions!
davidbeers
10-10-2002, 04:44 PM
Note: if I can't get the collapsible section of the page to "roll up" and out of sight like a window blind, the second best would be to have it disappear and have the section beneath it roll smoothly up into its place. Do you see the kind of thing I'm getting at? Thx!
requestcode
10-10-2002, 07:01 PM
Perhaps you can adapt the script at this link:
http://www.dynamicdrive.com/dynamicindex3/document2.htm
It has the effect but is automatic.
adios
10-10-2002, 07:48 PM
Maybe not exactly what you're looking for but, :cool: nonetheless...
http://www.youngpup.net/
davidbeers
10-10-2002, 11:04 PM
Appreciate the links! None are *quite* what I need. I want to make the section to collapse in a smooth vertical motion and for the content beneath it to move up into its place. More like the way one of those cloth window blinds rolls up out of sight than the "slat" effect like venetian blinds.
The www.youngpup.com guy seems to have add and remove frames from a frameset in this manner on his site, but I couldn't find any scripts to describe this and I really want to collapse/expand a <div>, not a frame.
If anyone has any other ideas that are close, please let me know. I can adapt the script if it's anywhere near what I need. Thx again!
adios
10-11-2002, 03:41 AM
The www.youngpup.net guy seems to have add and remove frames from a frameset...
No! That's the beauty of his API: it simulates a framed-style layout - *without frames*. It's all document manipulation. One <iframe> is used as a buffer. Have a look at this:
http://www.youngpup.net/_ui_webapp/js/frames.js
I am not worthy....:(
davidbeers
10-13-2002, 06:10 AM
As it turned out I ended up using a different script the youngpup.net guy wrote for animating menu buttons. I *heavily* adapted it until I got it working for my own purposes. Learned a lot about Javascript in the process! You're right, he's doing some *amazing* stuff!
Works like a charm and it's more than just a great effect. It really solves a problem I was having with the UI on an overly complex page in a web app I'm developing. Now the user can quickly customize the page to display just what they need and the smooth-sliding transition makes it clear what is being done to the page. Before I had these jarring jumps as sections of the page vanished and other stuff that might have been offscreen popped into its place--very disconcerting and confusing to a new user.
At some point I'll post the revised script on dynamicdrive.com. Thanks for pointing me in the right direction!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.