Note that there are some explanatory texts on larger screens.

plurals
  1. POmultiple droppable
    primarykey
    data
    text
    <p>I've have multiple droppable divs (which all have the same size) and one draggable div. The draggable div is 3 times bigger than one droppable. When I drag the draggable div on the droppables divs I want to find which droppable has been affected. </p> <p>My code looks like this:</p> <pre><code>$(function () { $(".draggable").draggable({ drag: function (event, ui) { } }); $(".droppable").droppable({ drop: function (event, ui) { alert(this.id); } }); }); </code></pre> <p>the html</p> <pre><code>&lt;div style="height:100px; width:200px; border-bottom:1px solid red; " id="Div0" class="droppable"&gt; drop in me1! &lt;/div&gt; &lt;div style="height:100px; width:200px; border-bottom:1px solid red;" id="Div1" class="droppable"&gt; drop in me2! &lt;/div&gt; &lt;div style="height:100px; width:200px; border-bottom:1px solid red; " id="Div2" class="droppable"&gt; drop in me2! &lt;/div&gt; &lt;div style="height:100px; width:200px; border-bottom:1px solid red; " id="Div3" class="droppable"&gt; drop in me2! &lt;/div&gt; &lt;div style="height:100px; width:200px; border-bottom:1px solid red; " id="Div4" class="droppable"&gt; drop in me2! &lt;/div&gt; &lt;div style="height:100px; width:200px; border-bottom:1px solid red; " id="Div5" class="droppable"&gt; drop in me2! &lt;/div&gt; &lt;div style="height:100px; width:200px; border-bottom:1px solid red; " id="Div6" class="droppable"&gt; drop in me2! &lt;/div&gt; &lt;div style="height:100px; width:200px; border-bottom:1px solid red; " id="Div7" class="droppable"&gt; drop in me2! &lt;/div&gt; &lt;div class="draggable" id="drag" style="height:300px; width:50px; border:1px solid black;"&gt;&lt;span&gt;Drag&lt;/span&gt;&lt;/div&gt; </code></pre> <p>But my alert only shows the first which my draggable div (Div0) hits, how can I find the missing (Div1 and Div2), which also is affeckted?? </p> <p>Here's a guy with the same problem : <a href="http://forum.jquery.com/topic/drop-onto-multiple-droppable-elements-at-once" rel="nofollow noreferrer">http://forum.jquery.com/topic/drop-onto-multiple-droppable-elements-at-once</a></p>
    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.
 

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