View Full Version : re-positioned when hidden

07-23-2002, 05:57 PM

I have this code , which makes it possible to drag Divs, Hide and show them, but I have this problem, which is.. if you drag a Division then click on my swap function (which basically shows one div and hides another). when the division is shown again it is made visable in the same place as when made hidden. I am trying to::::

when it is made hidden its sets to its origional position when first loaded


any ideas

07-23-2002, 11:00 PM
You could keep all of the original coordinates in an array, and when they "show" the div, set it to the initial position based on what was in the initial array, top and left.

var divPosition = new Array("divName = Array('10',15')",("divName2 = Array('30','30')");

If you don't have that position prior to the page loading, you could gather it when they first begin to move the window, and save it when they focus on that div.

Don't know if I explained that well....