Sha256: 7583c8c02e82c5b008120fb34504bfd9f04cebf662ab15a3163b7cc930608cc2

Contents?: true

Size: 787 Bytes

Versions: 25

Compression:

Stored size: 787 Bytes

Contents

(function($) {
  $.fn.fn = function() {
    var self = this;
    var extension = arguments[0], name = arguments[0];
    if (typeof name == "string") {
      return apply(self, name, $.makeArray(arguments).slice(1, arguments.length));
    } else {
      $.each(extension, function(key, value) {
        define(self, key, value);
      });
      return self;
    }
  };
  function define(self, name, fn) {
    self.data(namespacedName(name), fn);
  };
  function apply(self, name, args) {
    var result;
    self.each(function(i, item) {
      var fn = $(item).data(namespacedName(name));
      if (fn) result = fn.apply(item, args)
      else throw(name + " is not defined");
    });
    
    return result;
  };
  function namespacedName(name) {
    return 'fn.' + name;
  }
})(jQuery);

Version data entries

25 entries across 25 versions & 6 rubygems

Version Path
pivotal-screw-unit-0.4.0 core/lib/jquery.fn.js
pivotal-screw-unit-0.4.1 core/lib/jquery.fn.js
pivotal-screw-unit-0.4.2 core/lib/jquery.fn.js
pivotal-screw-unit-0.4.3 core/lib/jquery.fn.js
pivotal-screw-unit-0.5.0 core/lib/jquery.fn.js
pivotal-screw-unit-0.5.1 core/lib/jquery.fn.js
pivotal-screw-unit-0.5.2 core/lib/jquery.fn.js
pivotal-screw-unit-0.5.3 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.10 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.11 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.12 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.3 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.4 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.5 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.6 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.7 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.8 core/lib/jquery.fn.js
pivotal-screw-unit-server-0.5.9 core/lib/jquery.fn.js
honkster-screw-unit-server-0.6.3 core/lib/jquery.fn.js
honkster-screw-unit-server-0.6.2 core/lib/jquery.fn.js