SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    SitePoint Zealot
    Join Date
    Jul 2006
    0 Post(s)
    0 Thread(s)

    Dragging between lists

    Hey there,

    I am working on creating a script that allows a user to drag and drop between multiple sortable lists. I've got the dragging working fine, and I have a good plan for the dropping so that's sorted out.

    However, it turns out that when the user decides to click and drag a list item, I want to replace the list item with a dummy holder (no problem there got that worked out) and temporarily attach the list item to its own dummy ul item (so the user has the impression that he is grabbing the list item). Then when the user drops the list item, I'll insert it into the appropriate location in one of the lists (or move it back to the beginning if they drop it in the middle of nowhere).

    The problem I'm having is in determining the exact location to place the dummy UL so that the user doesn't feel like the list item is jumping around when they click on it.

    Also, it occurs to me that I will need to solve essentially the same problem when determining the drop location for the list item, since I plan on comparing the page location of the moving list item with the page location of the static list items.

    So basically, this boils down to, how to do I find the exact page location of a LIST element within a UL element?
    Last edited by dwees; Jan 11, 2007 at 22:57.


Posting Permissions

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