Note that there are some explanatory texts on larger screens.

plurals
  1. PODrag and Drop - how to the drop the content into multiple "td"
    primarykey
    data
    text
    <p>I have done drag and drop work using with jquery plug-in, Jquery:</p> <pre><code> $(document).ready(function() { $(".list").draggable({helper: 'clone'}); $(".drop1").droppable({ accept: '.list', hoverClass: 'dropareahover', drop: function(ev, ui){ var targetId = $(this).attr("id"); var allTargets = $("#" + targetId, ".tble"); $("td#" + targetId).each(function() { $(this).append(ui.draggable.text()); alert(ui.draggable.text()) }); } }); }) </code></pre> <p>Html:</p> <pre><code>&lt;div class="draggable"&gt; &lt;ul&gt; &lt;li class="list" id="1"&gt;Teacher1&lt;/li&gt; &lt;li class="list" id="2"&gt;Teacher2&lt;/li&gt; &lt;li class="list" id="3"&gt;Teacher3&lt;/li&gt; &lt;li class="list" id="4"&gt;Teacher4&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="drop"&gt; &lt;table class="tble"&gt; &lt;tr&gt; &lt;td class="drop1 br" id="aa"&gt;&amp;nbsp;&lt;/td&gt; &lt;td class="drop1 br" id="ab"&gt;&amp;nbsp;&lt;/td&gt; &lt;td class="drop1 br" id="ac"&gt;&amp;nbsp;&lt;/td&gt; &lt;td class="drop1 br" id="ad"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="drop1 br" id="aa"&gt;&amp;nbsp;&lt;/td&gt; &lt;td class="drop1 br" id="ab"&gt;&amp;nbsp;&lt;/td&gt; &lt;td class="drop1 br" id="ac"&gt;&amp;nbsp;&lt;/td&gt; &lt;td class="drop1 br" id="ad"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;/div&gt; </code></pre> <p>Css:</p> <pre><code>.draggable { width:200px; height:200px; border:solid 1px #ccc; } .dropareahover { background-color:#EFD2A4; border-color:#DFA853; } .draggable ul { margin:0px; padding:0px; } .draggable ul li { list-style-type:none; } .drop { width:200px; height:200px; margin:10px 0px 0px 0px; border:solid 1px #ccc; } .drop1 { border:solid 1px #CCCCCC; width:100px; } .drop ul { margin:0px; padding:0px; } .drop ul li { list-style-type:none; } .tble{padding:0px 10px 0px 10px} </code></pre> <p>I want to drop the the teacher1 into multiple td.</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.
    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