title: jQuery pass dynamic id value to function
body: <p>Im new at JS/jQuery.</p>
  
  <p>I got this code:</p>
  
  <pre><code>&lt;button id="value1" class="buttonkontakte" onclick="kontakte()"&gt;KLICK1&lt;/button&gt;
  &lt;button id="value2" class="buttonkontakte" onclick="kontakte()"&gt;KLICK2&lt;/button&gt;
  &lt;button id="value3" class="buttonkontakte" onclick="kontakte()"&gt;KLICK3&lt;/button&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>function kontakte(){
      var getthevalue = ???????????????;
      $.ajax({
          type: 'post',
          url: 'post.php',
          data: {wasmachen: "kontakte", value: getthevalue},
          success: function(msg) {
              $('#kontakte').html(msg);
          }
      });
  }
  </code></pre>
  
  <p>Now when I click on KLICK1 I want to pass "value1" to the var getthevalue. How can I do that?</p>