title: Best way for retrieve custom data attribute from event in Meteor?
body: <p>I was wondering what is the best way for retrieve the value of a custom data HTML attribute with Meteor from event object?</p>
  
  <p>eg:</p>
  
  <p><strong>articles.html</strong></p>
  
  <pre><code>   &lt;template name="createArticle"&gt;
      &lt;form class="new-article"&gt;
          &lt;input type="text" name="title" placeholder="New title"/&gt;
          &lt;input type="text" name="content" placeholder="New content" /&gt;
          &lt;!-- list categ --&gt;
        &lt;label&gt;Category
          &lt;select id="categ-list" name="categ"&gt;
            {{#each categories}}
              &lt;option value="{{name}}" data-id={{_id}}&gt;{{name}}&lt;/option&gt;
            {{/each}}
          &lt;/select&gt;
        &lt;/label&gt;
          &lt;input type ="submit" value= "Create" class="button"&gt;
      &lt;/form&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p><strong>articles.js</strong></p>
  
  <pre><code>   Template.createArticle.events({
    "submit .new-article": function(event){
      var title = event.target.title.value;
      var content = event.target.content.value;
      var categName = event.target.categ.value;
      var categId = event.target.categ.data('id'); // HERE
      console.log("test " + categId);
      Meteor.call("addArticle", title, content, categId, categName);
      event.target.title.value = "";
      event.target.content.value = "";
      return false;
      },
      "click #categ-list": function(event){
  console.log('click');
      }
    });
  </code></pre>
  
  <p>How can I get the <code>data-id</code> attribute value in the event handler?</p>
  
  <p>EDIT: Add more code</p>
  
  <p>EDIT2:</p>
  
  <pre><code>console.log(event.target.categ)
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>&lt;select id="categ-list" name="categ"&gt; 
  &lt;option value="test" data-id="p5zKaEbEiRkQjCkGg"&gt;test&lt;/option&gt; 
  &lt;option value="test1" data-id="okPY6oyeXiFR7M3jd"&gt;test1&lt;/option&gt; 
  &lt;/select&gt;
  </code></pre>