Super Tiny JSONP Library
Switch branches/tags
Nothing to show
Pull request Compare This branch is 13 commits behind OscarGodson:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

#JSONP Beta 1.0 ##Alpha Stage

###What This is a super tiny JSONP library for when you don't need jQuery or another JS library just for JSONP requests.

###Why After searching for "JSONP examples" and "JSONP tutorials" I was dissapointed by the lack of straightforward JSONP stuff out there. While there is nothing wrong with jQuery and I use it every single day, sometimes you need to do some JSONP without using jQuery and so I wrote this for myself, but feel free to use it! The min version is only 621 bytes.


It's simple. There are three parameters, but you only need two. This is what it looks like:


To get my Twitter avatar for example you'd do:


Sometimes the third-party site require a custom method name, like Flickr, which requires jsoncallback rather than the standard callback method. Here's an example to get a thumbnail of my latest pic on Flickr:


###To do...

  • I have yet to test on any browsers by Firefox 4 and Chrome 11 on Mac
  • Set params programmatically rather than all in the URL
  • Anything else people request, if anything