title: JQuery Nested Sortable and Javascript
body: <p>Hello I am working on a JQuery nested sortable lists, I came across a plugin for nested sorting <a href="https://github.com/mjsarfatti/nestedSortable/blob/master/jquery.mjs.nestedSortable.js" rel="nofollow">here</a>
  I can drag and drop the list items successfully but I want to have an ajax call once an item in the list is dragged, Is it possible to this with this plugin ? Does it provide any option to call ajax after the drag is complete?</p>
  
  <p>My JS file is </p>
  
  <pre><code>$('#sortable').nestedSortable(
     {
          disableNesting: 'no-nest',
          forcePlaceholderSize: true,
          handle: 'div',
          items: 'li',
          opacity: .6,
          placeholder: 'placeholder',
          revert: 250,
          tabSize: 25,
          tolerance: 'pointer',
          toleranceElement: '&gt; div',
          connectWith: '.sortable',
              onChange: function(serialized) {
              },
              onStop : function(){
                  var element_id = $(this).attr("id");
                  var parent_id = $(this).parent().attr("id");
                  var prev_sibling_id = $(this).prev().attr("id");
                  if(parent_id=='trash'){
                      var url = $(this).attr("patent-trash");
                      var data = {PID:element_id};
                      $.ajax({
                          type: "POST",
                          data: data,
                          url:url,
                          cache: false,
                          success: function(data) {
                              document.location.reload(true);
                          }
                      });
                  }
   });
  </code></pre>
  
  <p>I used onStop before which worked but there were some issues, I think the plugin is same but some updates are done 1 month ago, Is it now giving any option for calling ajax after the drag is complete or is there any alternative way to do it?</p>
  
  <p>Please help me I tried all my efforts </p>
  
  <p>Thanks in advance </p>