【问题标题】:Jquery drag and drop div'sJquery拖放div的
【发布时间】:2012-01-08 20:09:35
【问题描述】:

我有类似的 HTML:

  <div class="form-container-ingredients">
     <div id="removable-ingredient-container-1"> 
       ... other elements
     </div>
     <div id="removable-ingredient-container-2"> 
       ... other elements
     </div>
     <div id="removable-ingredient-container-3"> 
       ... other elements
     </div>
  </div>

所以这代表了许多行,每一行都包含相同的元素。我还有添加新行和删除行的按钮。这行得通。

现在我想添加移动行的可能性,例如,在removable-ingredient-container-3 之后移动removable-ingredient-container-1。

根据我的示例,有没有人有关于如何在 jQuery 中做到这一点的示例或教程?

谢谢你, 升

【问题讨论】:

标签: javascript jquery html asp.net-mvc


【解决方案1】:

jQueryUI 有一个sortable 插件,您可以使用它干净轻松地实现该效果。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-03-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-03
    • 2013-06-15
    相关资源
    最近更新 更多