Materialize get modal trigger element
<p>How do I get the element that triggered a Materialize Modal?</p>

<p>Given this code :</p>

<pre><code>&lt;a class="trigger-modal" href="#modal1" data-id="1"&gt;Item 1&lt;/a&gt;
&lt;a class="trigger-modal" href="#modal1" data-id="2"&gt;Item 2&lt;/a&gt;
&lt;a class="trigger-modal" href="#modal1" data-id="3"&gt;Item 3&lt;/a&gt;

&lt;div id="modal1" class="modal modal-fixed-footer"&gt;
  &lt;div class="modal-content"&gt;
    &lt;h4&gt;Edit Model&lt;/h4&gt;
    &lt;form&gt; ... &lt;/form&gt;
  &lt;/div&gt;
  &lt;div class="modal-footer"&gt;
    &lt;a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat "&gt;Close&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;script type="text/javascript"&gt;
$(function () {
  $('.modal-trigger').leanModal({
    dismissible: false,
    ready() { console.log('Ready', this, arguments); },
    complete() { console.log('Closed', this, arguments); }
  });
});
&lt;/script&gt;
</code></pre>

<p>How can I get which anchor element triggered the modal? Both <code>ready</code> and <code>complete</code> only have <code>this</code> set to the modal options, and <code>arguments</code> is empty.</p>