Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Animate input asynchronously

  • Loading branch information...
commit 6b0ed40fe9b4185ef7feafb477b1fd591625c5bf 1 parent 094eb6a
@graingert authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 static/js/main.js
View
8 static/js/main.js
@@ -64,15 +64,17 @@ function loggedIn(email, immediate) {
function save(event) {
event.preventDefault();
+ var input = $("#content input")
+ input.fadeOut(200);
$.ajax({
type: 'POST',
url: '/api/set',
- data: { beer: $("input").val() },
+ data: { beer: input.val() },
success: function(res, status, xhr) {
- // noop
+ input.stop(true,true);
+ input.fadeIn(400);
}
});
- $("#content input").fadeOut(200).fadeIn(400);
}
// when the user clicks logout, we'll make a call to the server to clear
Please sign in to comment.
Something went wrong with that request. Please try again.