Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created March 3, 2011 00:20
Show Gist options
  • Select an option

  • Save ahoward/852076 to your computer and use it in GitHub Desktop.

Select an option

Save ahoward/852076 to your computer and use it in GitHub Desktop.
posting json with jquery....
var data = {};
var options = {};
options.type = 'POST';
options.url = url;
options.dataType = 'json';
options.cache = false;
options.data = jq.toJSON(data);
options.contentType = 'application/json; charset=utf-8';
options.success = function(){};
jq.ajax(ajax);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment