title: Onclick and $(this) in java/jq function
body: <p>Really simple question. Why doesn't</p>
  
  <pre><code>&lt;div class="plus-button" onclick="voteUp(' . $postid . ')" data-postid="' . $postid . '" name="like"&gt;+ ' . $voterow['totalupvotes'] . '&lt;/div&gt;
  </code></pre>
  
  <p>work with </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function voteUp(postid){
          var postid = postid;
          $(this).siblings('.minus-button').removeClass('disliked');    
          $(this).toggleClass('liked');
  
          $.ajax({
              type:"POST",
              url:"php/votesystem.php",
              dataType : 'html',
              data:'act=like&amp;postid='+postid,
              success: function(data){
                  $('.plus-button').html(data);
                  alert("Liked with id "+postid);
              }
          });
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>The div line works fine. The problem is that $(this) in the java/jq script is not recognized as a specific div class.</p>
  
  <p>I have tried using voteUp(this) and didn't get it to work. Also tried using </p>
  
  <pre><code>var postid = $(this).data('postid');
  </code></pre>
  
  <p>but my alert msg then says undefined id instead of whatever id it should be.</p>