Skip to content

Instantly share code, notes, and snippets.

@musicalbigfoot
Last active December 10, 2015 11:38
Show Gist options
  • Save musicalbigfoot/4428947 to your computer and use it in GitHub Desktop.
Save musicalbigfoot/4428947 to your computer and use it in GitHub Desktop.
JavaScript: jQuery .post to ajax controller
var postdata = {varname:varvalue};
$.post("/ajax/", postdata, function(data) {
console.log(data);
return false;
},'json');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment