0

jquery:

$('#divDroppable div').draggable({
    appendTo: "div.mainContainer div",
    revert: true,
    containment: $("div.mainContainer > div" ), 
    helper: "clone"
    //drop: handleCardDrop
    //cursor: "move"
    //snap: 'div.mainContainer div'
});

How do I restrict the dropped item to div.mainContainer > div? Otherwise, it should revert to the original place. The helper class is also not working properly.

Wesley Murch
  • 101,186
  • 37
  • 194
  • 228
4b0
  • 21,981
  • 30
  • 95
  • 142
  • I think you probably looking for this. http://stackoverflow.com/questions/5735270/revert-a-jquery-draggable-object-back-to-its-original-container-on-out-event-of-d – Talha Ahmed Khan Aug 01 '11 at 04:25
  • @Talha thanks a lot for link.But i dont under stand properly.Plz explani little for my case. – 4b0 Aug 01 '11 at 04:32
  • In that link, The answer show that how you restrict and revert back the `draggable` item, if not been dropped to its desirable place. – Talha Ahmed Khan Aug 01 '11 at 04:44

0 Answers0