Add counter

This commit is contained in:
2015-04-30 20:52:59 +04:30
parent d16e6fb07e
commit c9e8fa7433
7 changed files with 52 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,5 @@
var socket = io();
var $run = $('h1, h3, .options, a');
$('li[contenteditable]').click(function(e) {
@ -39,3 +41,9 @@ function success(ipsum) {
selection.removeAllRanges();
selection.addRange(range);
}
var counterElement = $('#counter');
socket.on('counter', function(data) {
console.log(data);
counterElement.html(data);
});