https://github.com/williscool/jquery-socket.io
jquery socket.io plugin and wrapper
https://github.com/williscool/jquery-socket.io
Last synced: 5 days ago
JSON representation
jquery socket.io plugin and wrapper
- Host: GitHub
- URL: https://github.com/williscool/jquery-socket.io
- Owner: williscool
- License: mit
- Created: 2011-03-29T08:42:48.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2013-11-13T22:05:06.000Z (over 11 years ago)
- Last Synced: 2025-03-31T06:41:19.513Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 519 KB
- Stars: 26
- Watchers: 2
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# jquery-socket.io
$(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) socket.io messages sent from the server to jquery events and
2) jquery events fired from the browser to socket.io messages sent from the client
## Usage
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
## Credits
client code and parts of the server code inspired by this article
[http://spiritconsulting.com.ar/fedex/2010/11/events-with-jquery-nodejs-and-socket-io/](http://spiritconsulting.com.ar/fedex/2010/11/events-with-jquery-nodejs-and-socket-io/)
Parts of the client depend on [`express`](http://expressjs.com).