Just FYI, the selector breaks when a person has a name like "Some Bro", anything with a space. I didn't clone your repo or anything so I'm just posting the issue + fix here. In clien.js
socket.on("isTyping", function(data) {
if (data.isTyping) {
if ($("#"+data.person.split(' ').join('-')+"").length === 0) {
$("#updates").append("<li id='"+ data.person.split(' ').join('-') +"'> " + data.person + " is typing.");
......MY CUSTOM CALLBACK, OMITTED
}
} else {
$("#"+data.person.split(' ').join('-')+"").remove();
}
});
As you can see it's a simple matter of splitting where any spaces are and joining by a non space char. Cool app, much thanks for sharing it. :)
Just FYI, the selector breaks when a person has a name like "Some Bro", anything with a space. I didn't clone your repo or anything so I'm just posting the issue + fix here. In clien.js
socket.on("isTyping", function(data) {
if (data.isTyping) {
if ($("#"+data.person.split(' ').join('-')+"").length === 0) {
$("#updates").append("<li id='"+ data.person.split(' ').join('-') +"'> " + data.person + " is typing.");
......MY CUSTOM CALLBACK, OMITTED
}
} else {
$("#"+data.person.split(' ').join('-')+"").remove();
}
});
As you can see it's a simple matter of splitting where any spaces are and joining by a non space char. Cool app, much thanks for sharing it. :)