The event object has a property called type.
...
if(event.type == 'click'){
//click stuff
}
...
On Mar 14, 5:40 pm, patrick <[email protected]> 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 [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.