开发者

jquery ui sortable elements stop sorting

开发者 https://www.devze.com 2023-03-31 19:20 出处:网络
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 some开发者_Go百科thing and the sortable list gets animated off screen then the e

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 some开发者_Go百科thing 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消