Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/arodu/jquery.comet
- Owner: arodu
- Created: 2016-08-26T16:07:17.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-16T14:19:09.000Z (over 6 years ago)
- Last Synced: 2024-10-09T02:39:13.635Z (29 days ago)
- Topics: ajax, comet, javascript, jquery, web
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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(){},
});
```