title: Get data attributes on click element alpinejs
body: <pre class="lang-html prettyprint-override"><code>&lt;li class=&quot;&quot;&gt;
      &lt;a @click.prevent=&quot;download(e)&quot; data-video=&quot;video_id&quot; data-url=&quot;{{ base_url('tools/download_thumbnail') }}&quot; data-quality=&quot;maxres&quot;  class=&quot;rounded-b bg-white hover:bg-public-primary hover:text-white  py-2 px-4 block whitespace-no-wrap&quot; href=&quot;#&quot;&gt;Max Res&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  <p>I have an element in alpinejs I want to get values of the  data attributes when I click on that link.</p>
  <p><a href="https://i.stack.imgur.com/iSjqG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iSjqG.png" alt="enter image description here" /></a></p>