mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Adding query 1.8.0 and pubsub bus
This commit is contained in:
21
js/lib/pubsub.js
Normal file
21
js/lib/pubsub.js
Normal file
@ -0,0 +1,21 @@
|
||||
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
|
||||
* http://benalman.com/
|
||||
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
|
||||
|
||||
(function($) {
|
||||
|
||||
var o = $({});
|
||||
|
||||
$.subscribe = function() {
|
||||
o.on.apply(o, arguments);
|
||||
};
|
||||
|
||||
$.unsubscribe = function() {
|
||||
o.off.apply(o, arguments);
|
||||
};
|
||||
|
||||
$.publish = function() {
|
||||
o.trigger.apply(o, arguments);
|
||||
};
|
||||
|
||||
}(jQuery));
|
Reference in New Issue
Block a user