javascript - jQuery Sortable - moving elements between list with Double-Click -


i add functionality original jquery sortable connect list example at: http://jqueryui.com/sortable/#connect-lists

since second list (#sortable2) kind of large... able scroll page down , once found item need select/move... double.click on in order move other list.

i need move items (li) #sortable2 #sortable1 #sortable1 #sortable2. idea double-click , not dragging.

thanks!

your html

 <ul id="sortable1" class="sortable_list connectedsortable">     <li class="ui-state-default">sortable1 item 1</li>     <li class="ui-state-default">sortable1 item 2</li>  </ul>  <ul id="sortable2" class="sortable_list connectedsortable">     <li class="ui-state-default">sortable2 item 1</li>     <li class="ui-state-default">sortable2 item 2</li>  </ul> 

only id = sortable2 have items appended sortable1 li.class = ui-state-default. adds 1 li item @ time sortable2 sortable1 .

script

//attach on load $(function() {    $("#sortable2 .ui-state-default").dblclick(function(){              $("#sortable1").append(this);    }); }); 

Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -