Created
March 13, 2015 03:00
-
-
Save high5/da24d87fbe53ac41522f to your computer and use it in GitHub Desktop.
ajax request sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
async:false, | |
cache:false, | |
type: "POST", | |
url: "/todos", | |
data: { title: text} | |
}) | |
.done(function(msg) { | |
var id = msg; | |
_todos[id] = { | |
id: id, | |
complete: false, | |
text: text | |
}; | |
}) | |
.always(function( jqXHR, textStatus ) { | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment