title: jQuery UI: How to save "sortable"?
body: <p>I have a list of "tasks" and I'm using "sortable" so that a user can prioritize them, putting the most important ones on top. But of course, every time the page is refreshed they go back to their original position. I'm wondering if it's possible to save the position of the tasks? </p>
  
  <p>Here's my code (it's a rails project): </p>
  
  <pre><code>&lt;script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"&gt;&lt;/script&gt;
  
    &lt;script&gt;
      $(document).ready(function() {
        $('.move').sortable();
        });
    &lt;/script&gt;
  
  
  &lt;%= render "form" %&gt;
  
  
  
  &lt;div class="move"&gt;
  &lt;% if !@project.tasks.blank? %&gt;
    &lt;% for item in @project.tasks %&gt;
    &lt;div class="container"&gt;
    &lt;div class="panel panel-default"&gt;
    &lt;div class="panel-heading"&gt;
      &lt;div class='move'&gt;&lt;%= item.title %&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="panel-body"&gt;
    &lt;p&gt;
      &lt;div class='move'&gt;&lt;%= item.description %&gt;&lt;/div&gt;
    &lt;/p&gt;
    &lt;%= link_to "Edit", edit_project_task_path(@project, item) %&gt; 
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;% end %&gt;
  &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>