title: CKAN Basic API jQuery Not Working
body: <p>Playing around with the <strong><em>CKAN API</em></strong>.</p>
  
  <p><em>Endpoints</em> all live e.g. <a href="http://yuj.it/api/action/datastore_search?resource_id=ed654ac3-2b2b-42f2-bd39-6928cf009c0f" rel="nofollow">http://yuj.it/api/action/datastore_search?resource_id=ed654ac3-2b2b-42f2-bd39-6928cf009c0f</a></p>
  
  <p>Using jQuery cannot get <strong><em>any</em></strong> results using jQuery AJAX...</p>
  
  <p>What don't I know?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"&gt;&lt;/script&gt;
  &lt;meta charset="utf-8"/&gt;
  &lt;title&gt;CKAN API TEST&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script&gt;
  $(document).ready(function(){
    var data = {resource_id: 'ed654ac3-2b2b-42f2-bd39-6928cf009c0f'};
    $.ajax({
      url: 'http://yuj.it/api/action/datastore_search',
      type: 'POST',
      data: data,
      cache: true,
      dataType: 'jsonp',
      success: function(data) {
        alert('yay');
      },
      error: function(data) {
        alert('boo');
      }
    });
    });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="true">
  <div class="snippet-code snippet-currently-hidden">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;!DOCTYPE html&gt;
      &lt;html lang="en"&gt;
      &lt;head&gt;
      &lt;script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"&gt;&lt;/script&gt;
      &lt;meta charset="utf-8"/&gt;
      &lt;title&gt;CKAN API TEST&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;script&gt;
      $(document).ready(function(){
        var data = {resource_id: 'ed654ac3-2b2b-42f2-bd39-6928cf009c0f'};
        $.ajax({
          url: 'http://yuj.it/api/action/datastore_search',
          type: 'POST',
          data: data,
          cache: true,
          dataType: 'jsonp',
          success: function(data) {
            alert('yay');
          },
          error: function(data) {
            alert('boo');
          }
        });
        });
      &lt;/script&gt;
      &lt;/body&gt;
      &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>