title: linkedin apply button callback and jquery (or ext callbacks in general)
body: <p>I'm adding the linkedin apply button to a site and will use the callback to track applications</p>
  
  <p><a href="https://developer.linkedin.com/apply-processing-applications" rel="nofollow">https://developer.linkedin.com/apply-processing-applications</a></p>
  
  <p>Linkedin docs/example:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function myOnclickFunction(r) {
          alert("click");
          console.log(r);
          // do something here
  }
  
  function myOnsucesssFunction(r) {
          alert("success");
          console.log(r);
          // do something else here
  }
  &lt;/script&gt;
  
  &lt;script type="IN/Apply" 
        data-email="apply-test@linkedin.com" 
        data-companyId="1337" 
        data-jobTitle="Chief Cat Herder" 
        data-onclick="myOnclickFunction"
        data-onsuccess="myOnsuccessFunction"&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm able to do this with conventional javascript, but would like to try this as my first jquery project, but have no idea how to start.</p>
  
  <p>Could someone give me a start on how I can go from here (just give an outline - not expecting to have it written for me!)</p>
  
  <pre><code>$(document).ready(function() {
     // do stuff when DOM is ready
   });
  </code></pre>
  
  <p>to adding a function within there that linkedin can call, or even a link to similar examples, as all my searching with the keyword callback seem to reference callbacks generated by other jquery functions.</p>
  
  <p>I will need to extract some json data, and do an ajax call.
  Thanks, Kevin</p>