Skip to content

Instantly share code, notes, and snippets.

@RyanNutt
Last active October 19, 2019 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanNutt/e2d372695a9cae4601b0499a6654d3de to your computer and use it in GitHub Desktop.
Save RyanNutt/e2d372695a9cae4601b0499a6654d3de to your computer and use it in GitHub Desktop.
NetBeans code template for jQuery Ajax call.

NetBeans jQuery Ajax Template

This is one of my NetBeans code completion templates that I use for jQuery ajax requests to insert all of the pieces that I use in pretty much every request. I got tired of having to type all of this every time, and I got tired of having to copy this over every time I move to a different computer so it's a Gist now...

I use $ajax as the trigger for this template, but anything should work.

jQuery.ajax(url, {
method: 'POST',
data: {
},
beforeSend: function (xhr, settings) {
},
complete: function (xhr, status) {
},
error: function (xhr, status, error) {
},
success: function (data, status, xhr) {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment