【问题标题】:Jquery Sortable Connect List + PHP/MySQLJquery 可排序连接列表 + PHP/MySQL
【发布时间】:2011-03-31 20:53:10
【问题描述】:

我一直在到处寻找没有运气的解决方案。

我正在寻找一种将此处找到的示例http://jqueryui.com/demos/sortable/#connect-lists 与 PHP/MySQL 合并的方法。

有几个例子只适用于一个列表,即http://www.wil-linssen.com/musings/entry/extending-the-jquery-sortable-with-ajax-mysql/

但我还没有找到一个包含多个列表的示例。

有没有人有解决方案或有效示例的链接?

谢谢! /大卫

【问题讨论】:

    标签: php jquery mysql jquery-ui-sortable


    【解决方案1】:

    添加回调(从文档中获取和扩展的示例):

    $( "#sortable1, #sortable2" ).sortable({
        connectWith: ".connectedSortable",
        update : function(event, ui) {
            //ui.sender is the list the item comes from
            //ui.item is the current item that moved
            //ui.position is the current position
        }
    
    }).disableSelection();
    

    现在使用 ui 参数在回调中执行任何您想要的 ajaxy 操作。

    【讨论】:

      猜你喜欢
      • 2011-01-31
      • 2015-07-08
      • 1970-01-01
      • 2016-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-12
      相关资源
      最近更新 更多