title: How do I reference data from a parent element using jQuery?
body: <p>I would like to reference the data-post-id of a parent div when clicking on an achor:</p>
  
  <pre><code>&lt;div data-post-id="5"&gt;
   &lt;a data-vote-type="1"&gt;Like&lt;/a&gt;
   &lt;a data-vote-type="2"&gt;Dislike&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>To reference the vote-type, I can do this:</p>
  
  <pre><code>var voteData = '&amp;voteType=' + $(this).data('vote-type')
  </code></pre>
  
  <p>But I would also like to include the post-id in the <code>voteData</code> var. I'm not sure how to do this however. I have multiple posts on the page, each with their own like/dislike buttons!</p>