Adding objects to jQuery UI Sortable list - possible?


I hava sortable list using jQuery UI Sortable. When the items are re-ordered the new order is written to the database. All working fine — however, if I use jquery to add a new item …

$('.litodo:first-child').before('<li id="todosArray_300" class="litodo"><a href="" id="300" class="todo active">'+todotext+'</a></li>');

then this item is ‘sortable’ on page and even calls the “update order” function but doesn’t actually update the database.

View the example here

Can some find my bug?!? :eye:

hmmmm tried reading the documentation again.

$(“#sortable”).sortable(‘refresh’); does not seem to help.

I have this same problem. Did you find a solution? I tried Jquery sortable(‘refresh’), adding sortable item with ASP.NET, no sucess.

Are you still having a issue? I did have a solution but can’t access the code now. I could post it later if you are?

If think it may have been to so with the .bind() command but can’t be sure from memory.

Yes. Please. Thanks