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
Search Repo:
fixed for IE
danwrong (author)
Tue Feb 05 03:57:45 -0800 2008
commit  c0a50e167c96b1cdbebcb46ab27c186ebb15bc57
tree    fe8ca3a0a634687e69b4a7f49b9dbd2efefef684
parent  a5a98f9019beaf9e8bdc58d2f5858a34ea643ca9
...
87
88
89
 
 
 
 
 
 
 
 
 
90
91
92
93
 
 
94
95
96
...
87
88
89
90
91
92
93
94
95
96
97
98
99
 
 
 
100
101
102
103
104
0
@@ -87,10 +87,18 @@
0
     }
0
   }
0
   
0
+ var behaviorWrapper = function(behavior) {
0
+ return $.klass(behavior, {
0
+ initialize: function($super, element, args) {
0
+ this.element = $(element);
0
+ $super.apply(this, args);
0
+ }
0
+ });
0
+ }
0
+
0
   var attachBehavior = function(el, behavior, args) {
0
- var instance = { element: $(el) };
0
- instance.__proto__ = behavior.prototype;
0
- behavior.apply(instance, args);
0
+ var wrapper = behaviorWrapper(behavior);
0
+ instance = new wrapper(el, args);
0
 
0
       bindEvents(instance);
0
 

Comments

    No one has commented yet.