1 Replies - 292 Views - Last Post: 23 August 2011 - 04:05 PM

#1 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

how to detect if element inside a div been dragged out of the div ?

Posted 23 August 2011 - 04:04 PM

Hi, I have elements inside a div. I want to detect that when some clicks and drags the elements outside the div. I want the code to take that elements html code and take it out of the div but still on the page.

that way when the person drags the element out of the div the element no longer belongs to the div.

How can one do this?


I have elements for example like text or the <a> tag inside a div. everything is draggable. so you can drag the <a> tags . I want to detect if the user drags the <a> tags out of that div to take the <a> tag html code out of the div. So the element no longer is linked or the child of the div. I want it to become a parent of it's own. like right now when you drag the elements and then drag the div, the div will still move the <a> tag that is now displayed outside of the div. I want to break that link... and the same goes the other way around where if there is an <a> tag outside of the div and the user clicks and drags that <a> tag and puts it into a div it will become the divs child.

How would one do this?

Is This A Good Question/Topic? 0
  • +

Replies To: how to detect if element inside a div been dragged out of the div ?

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10561
  • View blog
  • Posts: 39,071
  • Joined: 27-December 08

Re: how to detect if element inside a div been dragged out of the div ?

Posted 23 August 2011 - 04:05 PM

You already have one thread open on this. Please do not open duplicate topics.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1