Add counter
This commit is contained in:
3
ipsum/js/libs/socket.io.js
Normal file
3
ipsum/js/libs/socket.io.js
Normal file
File diff suppressed because one or more lines are too long
@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user