Created
March 23, 2022 23:01
-
-
Save samuelteixeiras/871a4f8725a8268d3b5dcebef1bdc62b to your computer and use it in GitHub Desktop.
Ping function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var socket = io(); | |
$('form').submit(function(){ | |
socket.emit('chat message', "<div class='msg-ping'>Ping:" + $('#m').val() + "</div>"); | |
$('#m').val(''); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment