SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Sharepoint List called "tasks". The field names are taskname (string), priority (integer). Using JQuery's sortable feature I am at the point that the user can manually sort a list by dragging and dropping items. It looks great but now I want Sharepoint to remember the final priority for each item in the list, say, after pressing a 'save' button. A minimal working example would be great.

share|improve this question

Define a function to be fired on the update method for sortable(). That option will fire any time the user drops the items into their order. You can then push all of the sortable items into an array and fire off an ajax request to SPServices to update each of the list items.

If you want to do it as a button event instead of using the update listener on the sortable object, just bind a function to the button to serialize all of the sortable elements, iterate through them, and call the ajax request to update the order field on each.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.