Jump to content

Drag and Drop--coordinates


phpknight

Recommended Posts

Is there any way to drag and drop elements that are not abolutely positioned but just in the normal flow?  For instance, is there a function to see what the element was that a person clicked the mouse or let go on?  I guess I am looking for something like getElementByID but getElementID (mouseCoordinates) that returns the id of the element of the mouse or something.

Link to comment
Share on other sites

Right.  According to _Javascript: The Definitive Guide_, it says this "allow absolutely positioned elements [in css] to be ragged by the user" (421).  Other sites mention the same thing.  I want to know if I can do this with float and other elements as well. 

 

Therefore, I would probably need functions like what I mentioned above.  Or, can you just change the position to absolute once a user starts dragging and dropping? 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.