开发者

jQuery ConnectedSortable Double Click

开发者 https://www.devze.com 2023-01-30 10:01 出处:网络
I have two lists connected with connectedSortable in jQuery UI but I want to add a feature of the ability to double click on an item and have it move to the other list but I don\'t really kno开发者_如

I have two lists connected with connectedSortable in jQuery UI but I want to add a feature of the ability to double click on an item and have it move to the other list but I don't really kno开发者_如何学Cw how to go about it.


  $j('#list-one li').dblclick(function() {
    var litem = $j(this).clone();
    litem.appendTo($j('#list-two'));
    $j(this).remove();
  });

Ended up with something like this

0

精彩评论

暂无评论...
验证码 换一张
取 消