I need an extra pair of eyes...
I need an extra pair of eyes because I stared myself almost blind on this one...
I'm trying to make a SPAN that can be manually moved xx pixels to the left (that works ) and that can be manually moved back to the initial position... this last part just works to good: It moves back to the right and dissapears from the screen on the right side. I'm doing something wrong but the question is (as always) WHAT????
I put it online for you. Here it is
Thanx in advance,
Shakespeare: onclick || !(onclick)
Vincent Puglia posted this at 19:47 — 31st October 2001.
They have: 634 posts
Joined: Dec 1999
Hi Jack,
if all you want is to move it back to the original pos,
sc1.style.pixelLeft = 310; // or whatever
should do it -- no call to setTimeout, etc.
if, however, you want it to move right from whatever position and not to cause the window to scroll -- that is, have the layer stop at the rightmost edge, or disappear off the right (without scrolling, you will need to check the layer's rightmost position (style.width or clip(x,y,h,w) ) against the window.innerWidth and either halt movement or change visibility.
Vinny
Where the world once stood
the blades of grass cut me still
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.