Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed chat boxes only sending once per refresh

  • Loading branch information...
commit 78290b6dbf10a55026c68d49105bf986c690415f 1 parent 8a737e3
Benjam Welker authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 scripts/game.js
  2. +2 −2 scripts/index.js
4 scripts/game.js
View
@@ -143,7 +143,7 @@ $(document).ready( function( ) {
// chat box functions
$('#chatbox form').submit( function( ) {
- if ('' == $.trim($('#chatbox input').val( ))) {
+ if ('' == $.trim($('#chatbox input#chat').val( ))) {
return false;
}
@@ -167,7 +167,7 @@ $(document).ready( function( ) {
'<dd'+(('1' == reply.private) ? ' class="private"' : '')+'>'+reply.message+'</dd>';
$('#chats').prepend(entry);
- $('#chatbox input').val('');
+ $('#chatbox input#chat').val('');
}
}
});
4 scripts/index.js
View
@@ -21,7 +21,7 @@ $(document).ready( function( ) {
// chat box functions
$('#chatbox form').submit( function( ) {
- if ('' == $.trim($('#chatbox input').val( ))) {
+ if ('' == $.trim($('#chatbox input#chat').val( ))) {
return false;
}
@@ -44,7 +44,7 @@ $(document).ready( function( ) {
var entry = '<dt>'+reply.username+'</dt>'+
'<dd>'+reply.message+'</dd>';
$('#chats').prepend(entry);
- $('#chatbox input').val('');
+ $('#chatbox input#chat').val('');
}
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.