Reputation: 1721
I have element in html as:
<div class="abc"
<ul>
<li class="noDrag">
<div></div>
<ul>
<li>
<div></div>
</li>
<li>
<div></div>
</li>
</ul>
</li>
</ul>
</div>
I have initialized drag and drop as:
$('.abc li').draggable({
cancel: ".noDrag",
cursor: 'move',
});
$('.abc li').droppable({
greedy: true
});
How to fix below:
1) Since "noDrag" class is in parent li it is also preventing the drag for childern li. I want to prevent drag for only div of parent li "noDrag" class.
2) I dont' want to even show the drag movement for "cancel" option elements. I want to show the normal cursor for those.
Upvotes: 0
Views: 101
Reputation: 4624
$('.abc>ul>li *').draggable({
cancel:'.noDrag>div',
cursor: 'move',
});
Hope this helps thank you
Upvotes: 1