After applying the http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css and http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js
the text of the
By the time the AJAX callback runs, this as a keyword has lost its context. You need to assign it to a variable to retain the reference. Something like this:
$(document).ready(function () {
$('#submit_btn').click(function (e) {
e.preventDefault();
var button = $(this);
button.val('Processing ...');
$.ajax({
cache: false,
type: "POST",
dataType: "json",
data: $('#form1').serialize(),
url: "echo/json",
complete: function (HttpRequest, textStatus) {
button.val('Create');
}
});
return false;
});
});