javascript - linkedin apply button callback and jquery (or ext callbacks in general) -


i'm adding linkedin apply button site , use callback track applications

https://developer.linkedin.com/apply-processing-applications

linkedin docs/example:

<script type="text/javascript"> function myonclickfunction(r) {         alert("click");         console.log(r);         // here }  function myonsucesssfunction(r) {         alert("success");         console.log(r);         // else here } </script>  <script type="in/apply"        data-email="apply-test@linkedin.com"        data-companyid="1337"        data-jobtitle="chief cat herder"        data-onclick="myonclickfunction"       data-onsuccess="myonsuccessfunction"> </script> 

i'm able conventional javascript, try first jquery project, have no idea how start.

could give me start on how can go here (just give outline - not expecting have written me!)

$(document).ready(function() {    // stuff when dom ready  }); 

to adding function within there linkedin can call, or link similar examples, searching keyword callback seem reference callbacks generated other jquery functions.

i need extract json data, , ajax call. thanks, kevin

no, if put inside of $(document).ready() placed in anonymous function , outside of global scope.

with that, should put function going called in global scope. since isn't getting called on load anyway, doesn't need inside $(document).ready().

also, careful $(document).ready(), if not used can slow down page load!

good luck jquery, downside you'll addicted!


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -