Jquery ui sortable ('refresh') doesn't work!

I have a sorted list I'm working with that may contain elements added and deleted by another script through jquery, and I have a weird problem. These newly created elements appear to be dragging, but they actually don't sort if I don't have them already when the page loads. I tried using sortable ('refresh'), but it seems to have no effect.

+5
source share
2 answers

To give you the opportunity to close this question and just for reference, if someone else stumbles about it, this seems to work fine in the latest jquery-ui. Here is jsfiddle: http://jsfiddle.net/fordlover49/mVrGA/

+2
source

I had a similar problem. As soon as I added a new item to the sort list, nothing else was dragged. My solution was to call the method destroy:

$( ".selector" ).sortable( "destroy" ); 

and then sort again.

+2
source

All Articles