title: trying to retrieve element data attribute from vue.js component in Laravel
body: <p><strong>Component</strong></p>
  
  <pre><code>&lt;template lang="html"&gt;
      &lt;div&gt;
          &lt;ul&gt;
              &lt;li @click="GetUser(this);" v-for="chatuser in chatusers" v-bind:data_id="chatuser.User_ID"&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  &lt;script&gt;
  
      export default {
          methods: {
              GetUser(id) {
                  debugger;
                  var data_id = $(id)[0].attr("data-id");
              }
          }
      }
  &lt;/script&gt;
  &lt;style&gt;
  
  &lt;/style&gt;
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>In the Li, on click event, there is a function GetUser() with this argument passed. This element has data-id attribute which I am trying to retrieve in the function.</p>
  
  <p>Problem is that, the data_id variable in the function is always undefined and when I debug the js code, it shows id value = Window.</p>
  
  <p>Am I missing anything?</p>