Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dropdown Menus

Status
Not open for further replies.

Hameedullah

Programmer
Aug 12, 2002
29
0
0
AU
I am working on a website and they require a dropdown menu. I have created the menu and it works perfectly fine.

Now I want to give it some kind of effect so instead of appearing all at once, it appears slowly (eg slides).

How can I do it in javascript.

You are either the slave of what made men or what men made.
 
You'll need to investigate either setTimeout, which calls a function after a specified delay, or setInterval, which repeatedly calls a function at a set interval.

Both can be stopped by passing the handle gained from the original method call to either clearTimeout or clearInterval.

To make the menu move, you'd incremement the relevant style properties (probably .style.top).

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top