You probably want to do something like:

mouseClick:. arguments[1].onClick || function(){}

and then, in your code, you hook up the click like so:

myelement.on("click", options.mouseClick);

which hooks the click event to the passed in function. If you need to do
other processing first, try:

myelement.on("click", function(evt){
  dostuff();
  options.mouseClick(evt);
});

Jerod Venema
Frozen Mountain Software
http://www.frozenmountain.com/
919-368-5105

On Fri, Nov 28, 2008 at 4:32 PM, Diodeus <[EMAIL PROTECTED]> wrote:

>
> I am building a Scriptaculous-based fisheye menu, which is coming
> along well. The thing I can't figure out is how to fire what is in the
> "onClick" callback I created.
>
> new Effect.FishEye('demo',{onClick:function(){alert("##")}})
>
> In the initialization I have:
>
> options = Object.extend({
>        mouseClick: arguments[1].onClick || '' ...
> })
>
> ...which then goes to this method:
>
> mouseClick: function(event) {
>        alert("ummmm...I dunno")
> },
>
> I've been looking at other effects code to try and figure it out, but
> I'm not getting anywhere.
>
> Here's the demo: jameslab.moveable.com/fisheye
>
> Thank you.
>
> - James.
>
>
> >
>


-- 
Jerod Venema

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to