Reputation: 12411
Please check my problem here - http://jsfiddle.net/EhQZH/17/
Description: I have a three list A, B and C, List B is nested inside list A. Both the list(A and B) can accept a list item from list C
When I am dragging list item from C to list B then the list item is included twice, one in B and another A. I want to avoid this. I want a single occurence of list item in A or B, on which it is dropped.
I have applied sorting, dragging, dropping etc. But I think I have done something wrong, can't find it.
Please let me know your suggestions.
Upvotes: 0
Views: 77
Reputation: 3948
I could find the problem. It is similar with div in a div. If you move your mouse cusor over the object #secondul, it is still in the object #firstul according the browsers. You can see it better if you change your code as like as following:
<ul id="#firstul" onMouseOver="alert('first')">
and
<ul id="#secondul" onMouseOver="alert('second')">
.
Another thing is, after dragging the Item3 into the second list, an error in jquery-ui.js will be fired. As concerned as the error message, I've got the theory the code will try to access the object from the source. Based on the situation above, the item does not exists anymore. It has been already moved to the #firtul.
Upvotes: 1