I am trying to let the user move a div from one place to another. When the user clicks on a div, it is removed from its current parentNode and transferred to a temporary moveable div using the DOM. Unfortunately, i don't know how to detect which of the numerous possible locations they have dragged it to in order that i can reconnect it to the fixed document in a new location.
AARgh that was not well explained.
OK. Imagine you are playing a card game on a computer. If you drag a card partially over a pile of cards, the program will detect which pile the card is over, and add the card to that pile, otherwise the card jumps back from whence it came. I am trying to do something similar, the only thing i cant work out is how to detect which 'pile' the 'card' is over.
In IE there is a function that will let you find an element from a coordinate but, unfortunately, it returns the 'card' that is being moved, instead of the pile.
AARgh that was not well explained.
OK. Imagine you are playing a card game on a computer. If you drag a card partially over a pile of cards, the program will detect which pile the card is over, and add the card to that pile, otherwise the card jumps back from whence it came. I am trying to do something similar, the only thing i cant work out is how to detect which 'pile' the 'card' is over.
In IE there is a function that will let you find an element from a coordinate but, unfortunately, it returns the 'card' that is being moved, instead of the pile.