Sha256: 336bde294a83277b5fba31bf3e793eac09ae416490bae09491cb249c4b70946f
Contents?: true
Size: 832 Bytes
Versions: 34
Compression:
Stored size: 832 Bytes
Contents
<h2 id="usage">Usage</h2> <p>In your hypertext (HTML) document using a plain vanilla cross-domain JavaScript request (using the JSONP technique):</p> <pre><code><script> function handleGames( json ) { // Do something with the returned data } </script> <script src="<%= url( '/' ) %>event/en.2012_13/round/2?callback=handleGames"></script> </code></pre> <p>Or using the jQuery library using the <a href="http://api.jquery.com/jQuery.getJSON"><code>getJSON</code> function</a>:</p> <pre><code>$.getJSON('<%= url( '/' ) %>event/en.2012_13/round/2?callback=?', function(json) { // Do something with the returned data }); </code></pre> <p>Note: Add the <code>callback=?</code> query parameter to tell jQuery to use a cross-domain JSONP request.</p> <p>That’s it.</p>
Version data entries
34 entries across 34 versions & 1 rubygems