OZONE Asylum
Forums
DHTML/Javascript
Just slide a div
This page's ID:
27770
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
A simple way to move a div and then hide it would be to create a function like this: [code] function moveDiv(id){ var div=document.getElementById(id) var newpos=parseInt(div.style.top)+2+"px" if(newpos<600){ // Here you put the value it should move to setTimeout("moveDiv("+id+")",100) // Tweak the time to get a smooth movement. } else{ setTimeout("functionToHideDiv()",1000) } } [/code] Just remember to give your div a top value of -height or less by default, or the script won't know from where to move it. Don't know how this will work out with inline though. /TwoD
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »