Skip to content

Instantly share code, notes, and snippets.

@stannehill
Created July 29, 2013 19:42
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 stannehill/6107146 to your computer and use it in GitHub Desktop.
Save stannehill/6107146 to your computer and use it in GitHub Desktop.
The last portion of the frontend code for socket.io blog post.
$(function () {
$('#target').click(function () {
$('#target').animate({top: '-200', opacity: 0.1}, 3000, function () {
socket.emit('volley', {'text': 'Shot made to server...'});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment