Where is the second argument in multiplier()? I'll try to explain in
example:
function multiplier(obj, times) {
times = isNaN(times) ? 2 : times;
if (typeof obj.value != 'undefined') {
return obj.value * times;
} else {
alert(obj + ': does not have a value property!');
}
}
obj_a.multiply = multiplier.methodize();
multiplier(obj_a, 2); // same as obj_a.multiply(2);
obj_a.multiply(2); // same as multiplier(obj_a, 2);
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/prototype-scriptaculous/-/84q1tp9qt6YJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.