Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery draggable / droppable issue
    primarykey
    data
    text
    <p>I've been trying to implement some simple draggable / droppable code (link below) with no success. The items drag, revert and stay in containment. However, when dropped in the droppable area the item gives the alert, as it should, but it is then no longer draggable.</p> <p>Ideally, I would like to have the item draggable between the drag and drop areas. Just in case the user moves it to the droppable area and then changes their mind. Once in the droppable area, I would like to also allow the item to be movable in there.</p> <p>Am I overlooking something obvious? Everything I found searching looked like it was pretty basic and straightforward to implement.</p> <p>I've been searching and trying a few things, but haven't had any luck. </p> <p><a href="http://jsfiddle.net/ySa3h/2/" rel="nofollow">http://jsfiddle.net/ySa3h/2/</a></p> <pre><code>&lt;div class="build_board_text" id="build_board_text"&gt; &lt;div id="src_landscape_8-5x11"&gt; &lt;div id="draggable_1" class="draggable_item"&gt; &lt;br /&gt;Text 1. &lt;/div&gt; &lt;div id="draggable_2" class="draggable_item"&gt; &lt;br /&gt;Text 2. &lt;/div&gt; &lt;/div&gt;&lt;!-- source list --&gt; &lt;div id="dst_landscape_8-5x11"&gt;&amp;nbsp;&lt;/div&gt;&lt;!-- destination list --&gt; &lt;/div $(function() { $('div', $('#src_landscape_8-5x11')).draggable({ revert: 'invalid', containment: '#build_board_text' }); $('#dst_landscape_8-5x11').droppable({ accept: '#src_landscape_8-5x11 &gt; div', drop: function() { alert('Dropped!'); } }); $('#src_landscape_8-5x11').droppable({ accept: '#dst_landscape_8-5x11 div', drop: function() { alert('Dropped back!'); } }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload