I have two drag and drop lists as follows. I would also like the ability to add a double click event that switches items between lists as well. Following is my sortable code.
$('.product_shipments').sortable
connectWith: '.available_product_shipments'
appendTo: 'body'
helper: 'clone'
dropOnEmpty: true
$('.available_product_shipments').sortable
connectWith: '.product_shipments'
appendTo: 'body'
helper: 'clone'
dropOnEmpty: true
Not sure where to start with regards to adding double click functionality as well. this is what I have so far. The following code does fire the event, but does not move the list item. to the other ul element. One thing that may be messing things up is that .available_product_li is a sub list of .available_product_shipments. any clues?
$(".available_product_li").delegate "li", "dblclick", ->
$(".available_product_li li.clicked").removeClass("clicked").appendTo "body"
$("#product_shipments").delegate "li", "dblclick", ->
$("#product_shipments li.clicked").removeClass("clicked").appendTo ".available_product_li"
It was as simple as this.