use $
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 7 Mar 2013 09:14:53 +0000 (10:14 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 7 Mar 2013 09:14:53 +0000 (10:14 +0100)
engine/static/js/manifold-pubsub.js

index ae9067f..748f240 100644 (file)
@@ -57,11 +57,11 @@ function clone_object(obj) {
 }
 
 /* https://gist.github.com/661855 */
-(function(jQuery) {
+(function($) {
 
-  var o = jQuery({});
+  var o = $({});
 
-  jQuery.subscribe = function( types, selector, data, fn) {
+  $.subscribe = function( types, selector, data, fn) {
     /* borrowed from jQuery */
     if ( data == null && fn == null ) {
         // ( types, fn )
@@ -97,11 +97,11 @@ function clone_object(obj) {
     }]);
   };
 
-  jQuery.unsubscribe = function() {
+  $.unsubscribe = function() {
     o.off.apply(o, arguments);
   };
 
-  jQuery.publish = function() {
+  $.publish = function() {
     o.trigger.apply(o, arguments);
   };