Skip to content

Commit

Permalink
rename class to class_name
Browse files Browse the repository at this point in the history
  • Loading branch information
igorw committed Jun 24, 2010
1 parent 2753078 commit 4ac2861
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ function clear_errors() {
$('#error').empty();
}

function chat_message(username, message, class) {
if (!class) {
var class = '';
function chat_message(username, message, class_name) {
if (!class_name) {
var class_name = '';
}

var now = new Date();
Expand All @@ -22,7 +22,7 @@ function chat_message(username, message, class) {
append($('<td>').text(now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds())).
append($('<td>').text(username)).
append($('<td>').text(message)
).addClass(class)
).addClass(class_name)
);

if ($('.chat-box tr').size() > 8) {
Expand Down Expand Up @@ -102,8 +102,8 @@ $(document).ready(function() {
});

server.bind('guess', function(event) {
class = event.correct ? 'correct-guess' : '';
chat_message(event.username, event.word, class);
class_name = event.correct ? 'correct-guess' : '';
chat_message(event.username, event.word, class_name);
});

// give
Expand Down

0 comments on commit 4ac2861

Please sign in to comment.