N
news.west.cox.net
I have a function which is called in during an onclick. The function needs
to determine the current position of a div, and act according to whether it
is currently a positive, negative or zero value.
I am able to move the div by doing the following:
document.getElementById('locator').style.top += 10;
If I try to retrieve this value with this:
var t = document.getElementById('locator').style.top;
alert(t);
But, it never shows any value, so I cannot determine its current value.
Any help is appreciated.
to determine the current position of a div, and act according to whether it
is currently a positive, negative or zero value.
I am able to move the div by doing the following:
document.getElementById('locator').style.top += 10;
If I try to retrieve this value with this:
var t = document.getElementById('locator').style.top;
alert(t);
But, it never shows any value, so I cannot determine its current value.
Any help is appreciated.