简体   繁体   中英

DragHandle Not working in TableDnD JQuery Plugin

I am using tablednd plugin to drag and drop my table rows everything works fine for me but when I try to use the DragHandle property then neither the rows are dragable nor the hander comes

My Script is as

<script type="text/javascript">
        $(document).ready(function() {
            $('#sort').tableDnD({
                onDrop: function(table, row) {
                  alert(row.id);
                }, 
                            dragHandle: ".dragHandle"
            });
        });
        </script>

When I remove the drag handle then it works and when I include it it does not work.

Any Ideas why its not working

Thanks

You might be using an older version (probably Version 0.4).

I had the same issue after downloading the plug-in from GitHub. Seems like you get served the old version, and not the current 0.7

By the way: dragHandle: ".dragHandle" is correct!

Remove . before dragHandle

  $('#sort').tableDnD({
            onDrop: function(table, row) {
              alert(row.id);
            }, 
            dragHandle: "dragHandle"
   });

See example here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM