Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 4th, 2012  |  syntax: None  |  size: 0.51 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /*!
  2.  *
  3.  *  * jQuery Tiny Pub/Sub - v0.3 - 11/4/2010
  4.  *
  5.  *  * http://benalman.com/
  6.  *
  7.  *  *
  8.  *
  9.  *  * Copyright (c) 2010 "Cowboy" Ben Alman
  10.  *
  11.  *  * Dual licensed under the MIT and GPL licenses.
  12.  *
  13.  *  * http://benalman.com/about/license/
  14.  *
  15.  **/
  16.  
  17. (function($){
  18.     var o = $({});
  19.  
  20.     $.subscribe = function() {
  21.         o.bind.apply( o, arguments );
  22.     };
  23.  
  24.     $.unsubscribe = function() {
  25.         o.unbind.apply( o, arguments );
  26.     };
  27.  
  28.     $.publish = function() {
  29.         o.trigger.apply( o, arguments );
  30.     };
  31. })(jQuery);