Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    Brighton, UK
    Posts
    282
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question re-positioned when hidden



    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

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    Western US
    Posts
    169
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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....

    ShriekForth


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •