Skip to content
forked from sobstel/jsonp.js

Lightweight JSONP library for cross-domain ajax calls.

Notifications You must be signed in to change notification settings

puwenhan/jsonp.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

jsonp.js

JSONP cross-domain ajax calls written in pure Javascript.

Usage

  $jsonp.send('url?callback=handleStuff', {
    callbackName: 'handleStuff',
    onSuccess: function(json){
      console.log('success!', json);
    },
    onTimeout: function(){
      console.log('timeout!');
    },
    timeout: 5
  });

Notes

You need to add callback name to URL yourself if you need it, eg.

$jsonp.send('url?callback=name', { callbackName: 'name' });

About

Lightweight JSONP library for cross-domain ajax calls.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%