Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (21 sloc) 1.03 KB

$(document).ready( function () {

    var jqSH = $.socketio();

    // greet the user on their console
    $(jqSH).bind('greeting', function(event, message){

        if(window.console) console.log(message);


How it works

It binds:

  1. messages sent from the server to jquery events and

  2. jquery events fired from the browser to messages sent from the client


there is both a client and a (node.js) server example in this repository to help you get started

Repository Layout

the wrapper branch shows how it works behind the scenes

the master or plugin branch allows you to just include and go


client code and parts of the server code inspired by this article

Parts of the client depend on express.