<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -28,6 +28,13 @@
             element.fn('name1').should(&quot;==&quot;, 1);
             element.fn('name2').should(&quot;==&quot;, 2);
           });
+          it(&quot;applies bound functions to each item in a collection&quot;, function() {
+            var elements = $(&quot;&lt;div&gt;&lt;/div&gt;&quot;).add($(&quot;&lt;div&gt;&lt;/div&gt;&quot;));
+            var i = 0;
+            elements.fn({ call: function() { i++ } });
+            elements.fn('call');
+            i.should(&quot;==&quot;, 2);
+          });
         });
       });
     &lt;/script&gt;</diff>
      <filename>fn_spec.html</filename>
    </modified>
    <modified>
      <diff>@@ -14,12 +14,16 @@
 	function define(self, name, fn) {
     self.data(namespacedName(name), fn);
   };
-  function apply(self, name, arguments) {
-    var fn = self.data(namespacedName(name));
-		if (fn)
-    	return fn.apply(self, arguments);
-		else
-		  throw(name + &quot; is not defined&quot;);
+  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 + &quot; is not defined&quot;);
+    });
+    return result;
   };
   function namespacedName(name) {
     return 'fn.' + name;</diff>
      <filename>jquery.fn.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d79e63f1ef66264971e92bd9115ec5e17d0be672</id>
    </parent>
  </parents>
  <author>
    <name>Nick Kallen</name>
    <email>nkallen@nick-kallens-computer-2.local</email>
  </author>
  <url>http://github.com/nkallen/effen/commit/51842de47f71869898e0dc58617caea4b1073f28</url>
  <id>51842de47f71869898e0dc58617caea4b1073f28</id>
  <committed-date>2008-03-09T18:32:58-07:00</committed-date>
  <authored-date>2008-03-09T18:32:58-07:00</authored-date>
  <message>the result is the last item in the collection</message>
  <tree>536413e24540b072ca3f890dfbd5cd0249e2d96e</tree>
  <committer>
    <name>Nick Kallen</name>
    <email>nkallen@nick-kallens-computer-2.local</email>
  </committer>
</commit>
