1

In my body I have a few images in a wrapper div:

<div id="wrapper">
    <img src="1.png" id="img1" />
    <img src="2.png" id="img2" />
    <img src="3.png" id="img3" />
</div>

which are all draggable with jQueryUI:

var $images = $('#img1, #img2, #img3')
    $images.draggable({ start: dragStart,
                        cursor: 'move',
                        stop: dragEnd });

All elements are position: absolute; and the wrapper has a fixed width: 1000px; height: 800px
What I would like to know is if its possible to stop the dragging when the img collides with the end of div and fire an event if it collides.

Carrie Kendall
  • 11,124
  • 5
  • 61
  • 81
supersize
  • 13,764
  • 18
  • 74
  • 133

0 Answers0