From f7191e59b140056715e9f74fd0d55dae081a703c Mon Sep 17 00:00:00 2001 From: Ali Movahedi Date: Tue, 16 Sep 2014 10:20:23 +0430 Subject: [PATCH] Update main.js --- client/js/main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/js/main.js b/client/js/main.js index 77e9a63..8a67647 100644 --- a/client/js/main.js +++ b/client/js/main.js @@ -1,3 +1,5 @@ +var socket = io(); + var $run = $('h1, h3, .options, a'); $('li[contenteditable]').click(function(e) { @@ -39,3 +41,7 @@ function success(ipsum) { selection.removeAllRanges(); selection.addRange(range); } + +socket.on('counter', function(count) { + $('#count').text(count); +});