In client side, you should first define an event listener for every type of event you need (using jQuery). In that listener, simply emit an socket.io event containing ID of element that triggered the event, so server can broadcast that to all other clients.

Also, if an event received from server, you should simulate that on it's corresponding element via jQuery.

In client side, you should first define an event listener for every type of event you need (using jQuery). In that listener, simply emit an socket.io event containing ID of element that triggered the event, so server can broadcast that to all other clients.

Also, if an event received from server, you should simulate that on it's corresponding element via jQuery.

in client side, you should first define an event listener for every type of event you need (using jQuery). in that listener, simply emit an socket.io event containing ID of element that triggered the event. so server can broadcast that to all other clients.

also, if an event received from server, you should simulate that on it's corresponding element via jQuery.

I think so! I have two separated functions in my app, one for serving files like this:
http.createServer(onRequest).listen(httpPort);
function onRequest (request, response) {
// stuff for serving files
}
and another function for serving socket.io:
io.sockets.on('connection', function (socket) {
// stuff for handling events
}
and these two are called in my index.js , Do you think I need to change this architecture?