Skip to content

Instantly share code, notes, and snippets.

@smedstadc
Created March 11, 2016 03:02

Revisions

  1. smedstadc created this gist Mar 11, 2016.
    11 changes: 11 additions & 0 deletions jsonp.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    function logIt(it) {
    console.log(it);
    }

    ajaxOptions = {
    url: 'http://myrequest.com/?param1=true&param2=false',
    dataType: 'jsonp',
    jsonpCallback: 'logIt'
    }

    response = $.ajax(ajaxOptions)