Alright guys so i'm stuck on this and can't seem to figure out why it's not working. I'm still relatively new to using socket.io and was hoping someone with more experience can help me out. I added an event listener for 'typing' so when a user is typing it broadcasts it to the room like so user is typing...
on my 'bindSocketEvents' server side i have the following
//nickname is already set
socket.emit('typing', { nick: nickname });
and then in my 'bindDOMEvents` function i have
socket.on('typing', function(data){
$('<li>' + data.nick + ' is typing...</li>').appendTo('.chat-rooms ul li');
});
//dont mind what its appending to i am just trying to get it working
my event doesn't seem to be emitted though and socket.on 'typing' is never fired