
July 10th, 2000, 09:46 PM
|
 |
Contributing User
|
|
Join Date: Feb 2000
Location: Perth West Australia
Posts: 757
Time spent in forums: 4 h 18 m 32 sec
Reputation Power: 14
|
|
|
The problem is that the div gets shown before the slide function begins - the code below solves the problem - but is not very efficient - but at least you know where the problem lies (it does work - I tested it)
function slideoutLeft() {
if (slideoutShown.xpos > -700) {
slideoutShown.xpos -= 30
slideoutShown.left = slideoutShown.xpos
setTimeout("slideoutLeft()",20)
}
else {
hide(slideoutShown)
//show(slideoutNew)//## FROM HERE
setTimeout("slideoutRight()",20)
}
}
function slideoutRight() {
show(slideoutNew)//###### TO HERE
if (slideoutNew.xpos < 0) {
slideoutNew.xpos +=20
slideoutNew.left = slideoutNew.xpos
setTimeout("slideoutRight()",20)
}
else {
slideoutShown = slideoutNew
slideoutActive = 0
}
}
This is not good coding as it forces a show() every time in the loop - but it works for now. Your code 'appears' to position everything off screen but manages to move it onscreen again just before the slide - mess around with that for a bit.
regards
Simon
------------------
Simon Wheeler
FirePages -DHTML/PHP/MySQL
|