I would personally just make a single function that checks the event
type and then do:
function myClickFunction(event) {
// click stuff
}
myObject.Observe('#blah:click', myClickFunction);
myObject.Observe('#blah:dblclick', myClickFunction);
I am not sure if there is a better way than that....
On Mar 14, 2010, at 6:40 PM, patrick wrote:
Hi,
I am using low pro's event behaviors, and currently am doing something
like this:
'#blah:click': function() {
// click stuff
}
'#blah:dblclick': function() {
// double click stuff
}
...
but I would like to minimize my code (since what I do with click vs
double click is quite similar) into something like this:
'blah:click, blah:dblclick': function() {
if (event == 'click') {
// click stuff
}
else if (event == 'dblclick') {
// double click stuff
}
}
Is there a way to do that?
-patrick
--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
.
To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com
.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en
.
--
You received this message because you are subscribed to the Google Groups "Prototype
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.