title: Ajax in Wordpress plugin
body: <p>I am creating a simple wordpress plugin and trying to use AJAX, but I always get 0 in ajax response. </p>
  
  <pre><code>&lt;script type="text/javascript" &gt;
  jQuery(document).ready(function($) {
  
  var data = {
      action: 'my_action',
      whatever: '1234'
  };
  
  
  jQuery.post("http://localhost/taichi/wp-admin/admin-ajax.php", data,   function(response) {
      alert(response);
  });
  });
   &lt;/script&gt;
  &lt;?php
  add_action('wp_ajax_my_action', 'my_action_callback');
  add_action( 'wp_ajax_nopriv_my_action', 'my_action_callback' ); 
  
  
  
  
  function my_action_callback() {
  
  echo "test";
  die();
  
  }
  </code></pre>
  
  <p>what am I doing wrong?</p>