Skip to content

Instantly share code, notes, and snippets.

@mborodov
Created February 2, 2016 07:48
Show Gist options
  • Save mborodov/aa2bfab3657c2cca4241 to your computer and use it in GitHub Desktop.
Save mborodov/aa2bfab3657c2cca4241 to your computer and use it in GitHub Desktop.
Gevent helper class for jQuery event/gevent library
'use strict'
var GeventCheckout = Class.create({
subscribe: function(action, callback) {
$j.gevent.subscribe($j('body'), action, callback);
},
subscribeArray: function(arrayAction, callback) {
$j.each(arrayAction, function(index, action) {
$j.gevent.subscribe($j('body'), action, callback);
});
},
publish: function(action, data) {
$j.gevent.publish(action, data);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment