Please check out this jsFIDDLE
<div id="wrapper">
<div class="item">
<div class="button_area"></div>
<div class="icon"></div>
</div>
<div class="item">
<div class="button_area"></div>
<div class="icon"></div>
</div>
</div>
This is the html code, and I am dragging the .button_area:
$('.button_area').draggable({});
It is working as it is suppused to except for one thing. When I click on the red area (in the second yellow square) and start dragging toward left (first yellow square) I want it to stop the drag process when the mouse gets over second yellow square (parent)…. not the draggable object (helper)… THE MOUSE.
with sokie’s and Lunik’s help, I did it: jsFIDDLE SOLUTION
Thanks guys.