Changeset 5587
- Timestamp:
- 05/13/08 19:56:42 (3 months ago)
- Files:
-
- 1 modified
-
trunk/ui/ui.core.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ui/ui.core.js
r5584 r5587 111 111 // create plugin method 112 112 $.fn[name] = function(options, data) { 113 var isMethodCall = (typeof options == 'string') ,114 args = arguments;113 var isMethodCall = (typeof options == 'string'); 114 [].shift.call(arguments); 115 115 116 116 if (isMethodCall && getter(namespace, name, options)) { 117 117 var instance = $.data(this[0], name); 118 return (instance ? instance[options](data) : undefined); 118 return (instance ? instance[options].apply(instance, arguments) 119 : undefined); 119 120 } 120 121 … … 124 125 $.data(this, name, new $[namespace][name](this, options)); 125 126 } else if (isMethodCall) { 126 instance[options].apply(instance, $.makeArray(args).slice(1));127 instance[options].apply(instance, arguments); 127 128 } 128 129 });