I want to check for a position of an absolute positioned div and move
down or up depending of its position
you can see the project im working on here (i wanna the horizontal dark
button to make move the banner div, up or down depending of the
position of the div)

http://mochikit.sc31.info/

// Heres the function im using, I know is very prmitive... so i know
there is a
// better  and incredible way using mochikit. so give me a hand
please!!!
function DownUpDiv() {
 y_position = document.getElementById('DIVID').style.top;
 if(y_position<=1) {
   // if is up put it down!
   document.getElementById('DIVID').style.top = 0;
 } else {
   // if is down... put it up!
   document.getElementById('DIVID').style.top = -450;
 }
}

// AND THEN IN HTML I HAVE TO PUT in the button
<a href="javascript:DownUpDiv();"><img src="button.gif" /></a>

You can see is working (sometimes... it just work one time) so i think
i can use mochikit to get stronger? functions? or i nees stronger
knoledge in javascript?

THANKS IN ADVANCE!!!
from Peru!
José Rivas


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to