title: How pass data-id to modal materialize?
body: <p>I am using api Materialize, i have created a modal for when i clicked a element, this element open a modal asking if i am sure of delete this element.
  my question is how pass the id of the element to modal?
  this is mi code:</p>
  
  <pre><code>&lt;div id="modal1" class="modal"&gt;
      &lt;div class="modal-content"&gt;
          &lt;h4&gt;Eliminar Compra&lt;/h4&gt;
          &lt;div class="divider"&gt;&lt;/div&gt;
          &lt;p&gt;¿Está seguro de que desea eliminar esta compra?&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
          &lt;a href="#!" class="btn modal-action waves-effect waves-red waves-light red"&gt;Si, estoy seguro&lt;/a&gt;
          &lt;a href="#!" class=" modal-action modal-close waves-effect btn-flat"&gt;No&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  Some code...
  &lt;a class="black-text waves-effect menu waves-light confirm" href="#modal1"&gt;
      &lt;i class="material-icons"&gt;delete&lt;/i&gt;
  &lt;/a&gt;
  </code></pre>