public
Description: A jQuery plugin version of the Low Pro behavior framework.
Homepage: http://lowprojs.org
Clone URL: git://github.com/danwrong/low-pro-for-jquery.git
added fn.attached and fn.firstAttached that can be used to retrieve 
behavior instances attached to elements
danwrong (author)
Thu Feb 14 03:43:12 -0800 2008
commit  c1dc9b8f95f0bd40fecaa048331cac9e7d5c45c9
tree    823602685c22c2b2e16a4646db339c909e1ae064
parent  09b55731ae4a2d5c1c9f3374db540581266bce13
...
140
141
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
144
145
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
0
@@ -140,6 +140,22 @@
0
     },
0
     delegate: function(type, rules) {
0
       return this.bind(type, $.delegate(rules));
0
+ },
0
+ attached: function(behavior) {
0
+ var instances = [];
0
+
0
+ if (!behavior.instances) return instances;
0
+
0
+ this.each(function(i, element) {
0
+ $.each(behavior.instances, function(i, instance) {
0
+ if (instance.element.get(0) == element) instances.push(instance);
0
+ });
0
+ });
0
+
0
+ return instances;
0
+ },
0
+ firstAttached: function(behavior) {
0
+ return this.attached(behavior)[0];
0
     }
0
   });
0
   

Comments

    No one has commented yet.