title: How to send element id in argument of jquery upvote plugin function
body: <pre><code> var callback = function(data) {
  
          $.ajax({
              url: '/vote/',
              type: 'post',
              data: {
                  id: data.id,
                  up: data.upvoted,
                  down: data.downvoted,
                  star: data.starred
              }
          });
      };
  
      $('.upvote').upvote({id: /how to send id of upvoted div here/, callback: callback});
  </code></pre>
  
  <p>and my django template code is:</p>
  
  <pre><code>    &lt;div id="topic-{{object.id}}" class="upvote"&gt;
              &lt;a class="upvote"&gt;&lt;/a&gt;
              &lt;span class="count"&gt;{{object.upvotes|sub:object.downvotes}}&lt;/span&gt;
              &lt;a class="downvote"&gt;&lt;/a&gt;
              &lt;a class="star"&gt;&lt;/a&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>I can extract the numerical part from id attribute of div. I just want to know how to send id in upvote function of ajax call.</p>
  
  <p>I am using <a href="https://github.com/janosgyerik/upvotejs" rel="nofollow noreferrer">Upvote</a>.</p>