title: getting value inside the list using sortable
body: <p>I am trying to get the value inside the <code>&lt;li&gt;</code> tag when the user drags the item on the list. I have modified it to get a unique value through localStoage in order to keep a track of the list but not the exact value like <code>"Item 1"</code>. Any help would be appreciated in this.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;ul id="items"&gt;
      &lt;li&gt;item 1&lt;/li&gt;
      &lt;li&gt;item 2&lt;/li&gt;
      &lt;li&gt;item 3&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>var el = document.getElementById('items');
  Sortable.create(el, {
      group: "localStorage-example",
      store: {
          get: function (sortable) {
              var order = localStorage.getItem(sortable.options.group);
              return order ? order.split('|') : [];
              console.log(order);
          },
          set: function (sortable) {
              var order = sortable.toArray();
              localStorage.setItem(sortable.options.group, order.join('|'));
              console.log(order);
          }
      }
  })
  </code></pre>
  
  <p>JSFiddle:</p>
  
  <p><a href="http://jsfiddle.net/tz89um73/" rel="nofollow">http://jsfiddle.net/tz89um73/</a></p>