Skip to content

Instantly share code, notes, and snippets.

@wwgist
Created June 18, 2013 09:18
Show Gist options
  • Save wwgist/5803904 to your computer and use it in GitHub Desktop.
Save wwgist/5803904 to your computer and use it in GitHub Desktop.
JQUERY: ajax.deferred
$.customMethod = function(){
return $.ajax({
url: '/targetUrl/',
// data: {param1: 'value1'},
dataType: 'jsonp',
}).promise();
};
var outer = $.customMethod();
outer.then(function(results){
// console.log(results);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment