Does anyone know how to listen to the mouse events such as CLICK or HOVER so that when I click or hover any element it will happen the same in the second browser? Apologies for not including the code.
<script>
// creating a new websocket
var socket = io.connect('http://localhost:8000');
// on message recived we print the new data inside the #container div
socket.on('notification', function (data) {
$("p").click(function () {
alert("Hello");
//or change the color
$(this).css({"color": "red"});
});
var usersList = "<div id='aaa'>";
$.each(data.users, function (index, user) {
usersList += "<p>" + user.users + "</p>";
});
usersList += "</div>";
$('#container').html(usersList);
});
</script>
<p>Click me!</p>