Advertisement
Guest User

Untitled

a guest
Feb 7th, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $.ajax({
  2.         url: url,
  3.         type: 'POST',
  4.         data: data, //json object
  5.         dataType: 'json'
  6. }).done(function (result) {
  7. //update DOM
  8. }).fail(function (result) {
  9. //request failed
  10. }).always(function (result) {
  11. //this always happens, cleanup (remove spinning wait thingy maybe?)
  12. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement