title: How trigger a stop method of jQuery sortable without manual move
body: <p>I'm using a jQuery sortable to order my lists I need test this on Jasmine but I don't know how trigger this event only using JS.</p>
  <p>This my JS object used for my lists:</p>
  <pre><code>List = {
    sortable: function(){
      var self = this;
  
      $( &quot;#lists&quot; ).sortable({
        stop: function(event, ui) {
          lis = $(&quot;.lists-container&quot;).find(&quot;li&quot;);
          list_ids = [];
          for (var i = 0; i &lt; lis.length; i++) {
            list_ids.push($(lis[i]).data(&quot;id&quot;)); 
          } 
          /* É preciso passar o token para impedir que alguém faça uma resquisição se passando por você */
          var csrfToken = $(&quot;meta[name='csrf-token']&quot;).attr(&quot;content&quot;);
          $.ajaxSetup({
            headers: {
              'X-CSRF-Token': csrfToken
            }
          });
          
          self.postReorder('/lists/reorder', {ids: list_ids}, function(){ console.log(&quot;Post done.&quot;) });
        }
      });
  
      $( &quot;#lists&quot; ).sortable({
        placeholder: &quot;ui-state-highlight&quot;
      });
  
      $( &quot;#lists&quot; ).disableSelection();
    },
    postReorder: function (url, data, succesessFunction){
      $.post(
          url, //'/lists/reorder',  
          data, //{ids: list_ids},
          succesessFunction  //function(){ console.log(list_ids) }
      );
    }
  };
  </code></pre>