Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/arodu/jquery.comet

Easy comet with jquery
https://github.com/arodu/jquery.comet

ajax comet javascript jquery web

Last synced: 25 days ago
JSON representation

Easy comet with jquery

Awesome Lists containing this project

README

        

# Easy jQuery.comet

* Install
```
bower install arodu-jquery-comet
```

* Connection
``` javascript
var comet = $.comet({
url: 'comet.php',
onMessage: function(m){
// Actions
}
});
```

* start
``` javascript
comet.start();
```

* stop
``` javascript
comet.stop();
```

* options
``` javascript
$.comet({
url: 'comet.php',
timeout: 60000,
type: 'GET',
dataType: 'json',
autoStart: true,
url: null, // String
onMessage: function(){},
onError: function(){},
});
```