title: How can I get the data-id attribute?
body: <p>I'm using the jQuery <em><a href="https://github.com/razorjack/quicksand" rel="noreferrer">Quicksand</a></em> plugin. I need to get the data-id of the clicked item and pass it to a webservice.</p>
  <p>How do I get the data-id attribute? I'm using the <code>.on()</code> method to re-bind the click event for sorted items.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("#list li").on('click', function() {
    //  ret = DetailsView.GetProject($(this).attr("#data-id"), OnComplete, OnTimeOut, OnError);
    alert($(this).attr("#data-id"));
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"&gt;&lt;/script&gt;
  
  &lt;ul id="list" class="grid"&gt;
    &lt;li data-id="id-40" class="win"&gt;
      &lt;a id="ctl00_cphBody_ListView1_ctrl0_SelectButton" class="project" href="#"&gt;
        &lt;img src="themes/clean/images/win.jpg" class="project-image" alt="get data-id" /&gt;
      &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>