After the menu is dropped the function _DDstop() fires. In that function I try and use _X and _Y to get the X and Y offsets so I can set a cookie and remember the value for the next page load however the _X and _Y values are "close" to what they should be but are not exact.
Currently I am using the following code to get it to work
Code: Select all
function surveyMenuSavePosition(x,y) {
// set a cookie here using x and y. Not shown in this example but you get the ide
}
function _DDstop()
{
_gm=$c("menu"+DragLayer);
_gm.style.zIndex=_zi;
if(!resetFollowScrollers&&_m[DragLayer][19])_m[DragLayer][19]=Y_-_sT-(gp[2]/2)
inDragMode=0;
var p = $('menu0').positionedOffset();
surveyMenuSavePosition(p[0],p[1]);
}
Code: Select all
function surveyMenuSavePosition(x,y) {
// set a cookie here using x and y. Not shown in this example but you get the ide
}
function _DDstop()
{
_gm=$c("menu"+DragLayer);
_gm.style.zIndex=_zi;
if(!resetFollowScrollers&&_m[DragLayer][19])_m[DragLayer][19]=Y_-_sT-(gp[2]/2)
inDragMode=0;
surveyMenuSavePosition(X_,Y_);
}
Code: Select all
var p = $('menu0').positionedOffset();
Anyone know how to use X_ and Y_ or if there is a better way to get the menu left and top offset in an absolutely positioned menu?