Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 6th, 2007, 02:13 PM
Authorized User
Join Date: Aug 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do i make my divs slide?

Hi guys, i have written a very basic javascript function so that when you click on a button selected divs either display or dissappear (see below).

<script language="javascript">

var divs=['header', 'middle', 'footer'];

function displaydiv()

for (var x=0;x<divs.length;x++)
  if (document.getElementById(divs[x]).style.display=='block')

Is there anyway i can make these divs slide out rather than appear instantly? This would just make it look that little bit better. Someone mentioned that i could do this using javascript. Any ideas?

Cheers in advance


Similar Threads
Thread Thread Starter Forum Replies Last Post
xslt slide show kawlaelo XSLT 6 February 13th, 2007 10:41 AM
divs inside divs: theory? Giant_robot_sandwich CSS Cascading Style Sheets 11 September 13th, 2006 03:56 PM
Image slide-show Rajarshi HTML Code Clinic 1 February 27th, 2006 06:03 AM
Slide Show #1 (New User) WebDevel Javascript How-To 1 March 15th, 2005 09:58 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.