小编use*_*254的帖子

当删除一个项目时,jquery ui获取droppable元素的id

我们如何获得droppable元素的id,当丢弃一个项目时?在这里我使用jquery ui和asp.net mvc.

 <table id="droppable">
    <tr>
    <td style="width:300px;height:50px">Backlog</td>
    <td style="width:300px;height:50px">Ready</td>
    <td style="width:300px;height:50px">Working</td>
    <td style="width:300px;height:50px">Complete</td>
    <td style="width:300px;height:50px">Archive</td>
    </tr>
        <tr id="cart">
        <td id="BackLog" class="drag"  style="width:120px;height:50px;">

         <img class="draggable" id="1234" src="../../Content/themes/base/images/ui-icons_222222_256x240.png" />

        </td>
            <td id="Ready"  class="drag"  style="width:140px;height:50px">


            </td>
            <td id="Working" class="drag"  style="width:140px;height:50px">

            </td>
            <td id="Complete" class="drag" style="width:140px;height:50px">


            </td>
            <td id="Archive" class="drag" style="width:140px;height:50px">

            </td>
        </tr>
    }
   </table> 
Run Code Online (Sandbox Code Playgroud)

在这里,我想将Ist列中的图像移动到其他列,并获取该列的ID.对于拖放我使用脚本

<script type="text/javascript">
    $(function () {
        $(".draggable").draggable({ containment: '#imageboundary', axis: "x" });
        $("#droppable").droppable({
            drop: function (event, ui) {                                      
                $.ajax({
                    type: "POST",
                    url: '/Project/AddToPhase/' + $(ui.draggable).attr("id") ,
                    success: function …
Run Code Online (Sandbox Code Playgroud)

drag-and-drop jquery-ui

44
推荐指数
3
解决办法
9万
查看次数

如何在回发后保持dropdownlist选择的值

在asp.net mvc3中如何在回发后保持下拉列表选中项目.

asp.net-mvc

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

asp.net-mvc ×1

drag-and-drop ×1

jquery-ui ×1