jQuery Draggable, Droppable, ASP.NET MVC

前端 未结 3 1480
生来不讨喜
生来不讨喜 2020-12-13 16:31

I\'ve been looking through a lot of tutorials on jQuery draggable/droppable, and trying to apply it to ASP.NET MVC, but I am really confused.

Most of the samples I

3条回答
  •  盖世英雄少女心
    2020-12-13 17:02

    Zing! It has been done. The problem was $(this).attr("id"). It needed to be $(ui.item).attr("id"). This returns the element being dragged, rather than the sortable container. Thank you SO much for all of your help.

    <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage>" %>
    
    
        Index
    
    
        
      <% foreach (var item in Model) { %> <% Html.RenderPartial("Item", item); %> <% } %>

提交回复
热议问题