Skip to content

beppu/jquery-ev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

jQuery.ev

The purpose of this library is to provide an easy way to long-poll
on a URL for events and dispatch as they come in.

API

Starting and Stopping the Event Loop

$.ev.loop(url, channels)

$.ev.stop()

Adding Event Handlers

I took a very low-tech approach to event handlers. Basically,
$.ev.handlers is treated as a hash that’s keyed by event.type and
contains functions that will run when events of that type come in.

$.ev.handlers[‘hello’] = function(ev){ console.log(ev.toSource()) };

Example

http://github.com/beppu/mad-scientists-lab/tree/master/chat/

http://bavl.org:4234/

About

a COMET event loop for jQuery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •