chris
chris

Reputation: 36937

jquery ui sortable elements stop sorting

I think this may have something to do with a .live() like issue. At one point I have an option where a user can select something and the sortable list gets animated off screen then the elements .remove() from the DOM. But then in the same hand I have an option to bring it back in, and I rebuild it into the page. At that point I lose the sort ability. Its worth mentioning that the initial loading of the elements is through jquery. So they aren't static elements when the page renders.

Upvotes: 0

Views: 434

Answers (1)

aziz punjani
aziz punjani

Reputation: 25776

If i were to take a guess then i think that the event bindings are lost when you remove elements from the list. Try running $('yourlist').sortable() again after you populate the list.

Upvotes: 1

Related Questions