title: Detect if element position was changed in Jquery UI sortable
body: <p>I use the following code to reorder items on my website:</p>
  
  <pre><code>$(document).ready(function () {
      $("#my-list").sortable({
          stop: function (event, ui) {
              var id = $(ui.item).attr('id');
  
              var url = '/en/account/changeposition?id=idreplace&amp;position=posReplace';
  
              url = url.replace("idreplace", id);
              url = url.replace("posReplace", ui.item.index());
  
              window.location.href = url;
          },
          distance: 15
      });
  });
  </code></pre>
  
  <p>However, even if I don't change element position and place element at the same place, Jquery UI will call 'stop'-function.</p>
  
  <p>Is it possible to detect if element index (position) was changed without using custom data attributes?</p>
  
  <pre><code>// I would like to avoid adding custom data attributes like this:
  &lt;li id="id100" data-original-position="1"&gt;&lt;/li&gt;
  &lt;li id="id101" data-original-position="2"&gt;&lt;/li&gt;
  </code></pre>