I am using the jQuery UI sortable widget. It's working fine at first. I have to populate the widgets dynamically开发者_运维百科 from a database. Now it's only working in the presence of one particular widget with id 1
. If I delete that particular widget, it is not working anymore. Help me please.
If you are populating the data dynamically you have to re-initialize it after the data is added.jQuery uses regex to handle elements so when you change the HTML structure jQuery doesn't recognize any of the new data, try re-calling the sortable method after each ajax call
精彩评论