I define a div, excItem, with absolute positioning and with a top of
400px. I then call a javascript function which does toggling of
visibility and should do positioning as well. I loop though the parents
with offsetTop to get the position of the clicking element, which here
is set in "y".
Here is the code snippet:
excItem.style.t op = y + 20;
alert('y=' + y + ' top=' + excItem.style.t op);
The resulting alert give a value of 677 for y and 400px for
excItem.style.t op.
Does anyone have any ideas on why this might be happening.
Notes:
1 - The excItem is defined as is evident from the alert.
2 - This worked fine in a test app I wrote.
400px. I then call a javascript function which does toggling of
visibility and should do positioning as well. I loop though the parents
with offsetTop to get the position of the clicking element, which here
is set in "y".
Here is the code snippet:
excItem.style.t op = y + 20;
alert('y=' + y + ' top=' + excItem.style.t op);
The resulting alert give a value of 677 for y and 400px for
excItem.style.t op.
Does anyone have any ideas on why this might be happening.
Notes:
1 - The excItem is defined as is evident from the alert.
2 - This worked fine in a test app I wrote.
Comment