How to append the dragging LI element at the end of UL in Jquery sortable? -


in jquery sortable how can restrict behavior of draggable 'li', should append 'ul' @ end?

<ul id="sortable1" class="connectedsortable">   <li class="ui-state-default">item 1</li>   <li class="ui-state-default">item 2</li>   <li class="ui-state-default">item 3</li>   <li class="ui-state-default">item 4</li>   <li class="ui-state-default">item 5</li> </ul>  <ul id="sortable2" class="connectedsortable">   <li class="ui-state-highlight">item 1</li>   <li class="ui-state-highlight">item 2</li>   <li class="ui-state-highlight">item 3</li>   <li class="ui-state-highlight">item 4</li>   <li class="ui-state-highlight">item 5</li> </ul>      <script>   $(function() {     $( "#sortable1, #sortable2" ).sortable({       connectwith: ".connectedsortable"     }).disableselection();   }); 

how can make 'sortable1 li' elements should appended @ end of 'sortable2' list not in between 'sortable2' li elements?

$( "#sortable1, #sortable2" ).sortable({   connectwith: ".connectedsortable",   receive: function( event, ui ) {       $(ui.item).appendto(this);   } }).disableselection(); 

demo


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -