jquery ui - Move items from one sortable connected list to the other programmatically -


i have 2 sortable connected lists #left , #right. want move elements #left #right when clicking button.

$('#left li').each(function() {     var $this = $(this);     $this.appendto('#right'); }); 

above function moves items receive function not triggered.

a jsfiddle of current state.

found way trigger receive event manually

$('#left li').each(function() {     var $this = $(this);     $this.appendto('#right');      // trigger     $('#right').sortable('option', 'receive')(null, { item: $this }); }); 

new jsfiddle


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -