shadowayex Posted May 3, 2011 Share Posted May 3, 2011 I have this HTML: <div class="one"> <div class="box"><p>I am a box</p></div> <div class="box"><p>I am a box</p></div> <div class="box"><p>I am a box</p></div> <div class="box"><p>I am a box</p></div> <div class="box"><p>I am a box</p></div> <div class="box"><p>I am a box</p></div> </div> <div class="two"></div> This CSS: div.one { border: 1px solid black; float: right; min-height: 200px; width: 45%; } div.two { border: 1px solid black; float: left; min-height: 200px; width: 45%; } div.box { border: 1px solid black; float: left; height: 40px; margin: 5px; padding: 5px; width: 40px; } And this Javascript/jQuery: $(document).ready(function() { $("div.box").draggable({ appendTo: "body", helper: "clone", revert: "invalid" }); } ); When I drag a .box, the above code will always revert it, as there's no valid placement yet. When the box is reverted, however, the ui-draggable class is removed, and the box can no longer be dragged. I'm using jQuery 1.5 and jQuery UI 1.8.4, but I tried it with the Google API's jQueryUI 1.8.12 and got the same issue.Is there something I've done wrong? Link to comment Share on other sites More sharing options...
shadowayex Posted May 3, 2011 Author Share Posted May 3, 2011 I've not found a real solution to this issue, but it seems to not happen when using jQuery 1.5.2. So the dodgy solution is to just not use jQuery 1.5. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.